From 4e8408e2253fa2e5220e7101b1d77c70ef407fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20D=C3=A9saulniers?= <rostydela@gmail.com> Date: Fri, 4 Mar 2016 15:47:50 -0500 Subject: [PATCH] python: lock before launching pht insert in test --- python/tools/dht/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tools/dht/tests.py b/python/tools/dht/tests.py index c2d016db..944a6662 100644 --- a/python/tools/dht/tests.py +++ b/python/tools/dht/tests.py @@ -308,15 +308,15 @@ class PhtTest(FeatureTest): # Index all entries. for key in keys: PhtTest.key = key - pht.insert(key, IndexValue(random_hash()), PhtTest.insertDoneCb) with FeatureTest.lock: + pht.insert(key, IndexValue(random_hash()), PhtTest.insertDoneCb) FeatureTest.lock.wait() # Recover entries now that the trie is complete. for key in keys: PhtTest.key = key - pht.lookup(key, PhtTest.lookupCb, PhtTest.lookupDoneCb) with FeatureTest.lock: + pht.lookup(key, PhtTest.lookupCb, PhtTest.lookupDoneCb) FeatureTest.lock.wait() all_entries[PhtTest.prefix] = [e.__str__() -- GitLab