From afb7e1b85e343b882135e4708bca0589cfd6dc0a 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 8c63fc24..2c65563e 100644 --- a/python/tools/dht/tests.py +++ b/python/tools/dht/tests.py @@ -277,15 +277,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