[Kimchi-devel] [Wok][RFC] #160: Fedora 25: Make check breaks on wok

Ramon Medeiros ramonn at linux.vnet.ibm.com
Fri Jan 13 18:47:48 UTC 2017


Issue:
make check on Fedora 25 returns error:

======================================================================
FAIL: test_object_store_threaded (test_objectstore.ObjectStoreTests)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "test_objectstore.py", line 105, in test_object_store_threaded
     self.assertEquals(10, len(store._connections.keys()))
AssertionError: 10 != 2

Error:

tests/test_objectstore isn't able to deal with function session.store

Propose:
As i saw, the issue is in this function:

     def test_object_store_threaded(self):
         def worker(ident):
             with store as session:
                 session.store('foo', ident, {})

         store = objectstore.ObjectStore(tmpfile)

         threads = []
         for i in range(50):
             t = threading.Thread(target=worker, args=(i,))
             t.setDaemon(True)
             t.start()
             threads.append(t)

         for t in threads:
                 t.join(0)

         with store as session:
             self.assertEquals(50, len(session.get_list('foo')))
             self.assertEquals(10, len(store._connections.keys()))


If a time.sleep is added to worker(), the issue is solved. So, store 
cannot handle too much tries, what happens at the first looping. As 
using sleep is too ugly, how can i improve the bug fix?

-- 

Ramon Nunes Medeiros
Kimchi Developer
Linux Technology Center Brazil
IBM Systems & Technology Group
Phone : +55 19 2132 7878
ramonn at br.ibm.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20170113/12f324c9/attachment.html>


More information about the Kimchi-devel mailing list