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

Ramon Medeiros ramonn at linux.vnet.ibm.com
Mon Jan 16 18:16:38 UTC 2017


daniel helped me to debug the issue and found that threading ident was 
the problem


On 01/13/2017 04:47 PM, Ramon Medeiros wrote:
>
> 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  
>
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel

-- 

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/20170116/1d9a4941/attachment.html>


More information about the Kimchi-devel mailing list