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

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


Threading identifier was not given a unique name. So, a name will be
passed to force it

Signed-off-by: Ramon Medeiros <ramonn at linux.vnet.ibm.com>
---
 src/wok/objectstore.py    | 4 ++--
 tests/test_objectstore.py | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/wok/objectstore.py b/src/wok/objectstore.py
index 817f60c..a571e5f 100644
--- a/src/wok/objectstore.py
+++ b/src/wok/objectstore.py
@@ -1,6 +1,6 @@
 # Project Wok
 #
-# Copyright IBM Corp, 2015-2016
+# Copyright IBM Corp, 2015-2017
 #
 # Code derived from Project Kimchi
 #
@@ -115,7 +115,7 @@ class ObjectStore(object):
             return
 
     def _get_conn(self):
-        ident = threading.currentThread().ident
+        ident = threading.currentThread().name
         try:
             return self._connections[ident]
         except KeyError:
diff --git a/tests/test_objectstore.py b/tests/test_objectstore.py
index 3ea7b70..96bcf13 100644
--- a/tests/test_objectstore.py
+++ b/tests/test_objectstore.py
@@ -2,7 +2,7 @@
 #
 # Project Wok
 #
-# Copyright IBM Corp, 2015-2016
+# Copyright IBM Corp, 2015-2017
 #
 # Code delivered from Project Kimchi
 #
@@ -91,7 +91,7 @@ class ObjectStoreTests(unittest.TestCase):
 
         threads = []
         for i in xrange(50):
-            t = threading.Thread(target=worker, args=(i,))
+            t = threading.Thread(target=worker, args=(i,), name=str(i))
             t.setDaemon(True)
             t.start()
             threads.append(t)
-- 
2.7.4



More information about the Kimchi-devel mailing list