[tor-commits] [bridgedb/master] Give BridgeDB more time to start before unit test.

phw at torproject.org phw at torproject.org
Wed May 27 17:14:43 UTC 2020


commit 8105032e2ab876d1c7d31471b828a0690f2bf6f3
Author: Philipp Winter <phw at nymity.ch>
Date:   Mon Apr 6 09:41:45 2020 -0700

    Give BridgeDB more time to start before unit test.
    
    The renaming of test_Bridges.py to test_bridgerings.py means that
    test_bridgedb_script.py is now run earlier (because tests are executed
    in alphabetic order), which means less time for BridgeDB to start.  This
    commit adds an extra sleep to a unit test, so we can be reasonably sure
    that BridgeDB is already running when unlinking its assignments file.
---
 bridgedb/test/test_bridgedb_script.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/bridgedb/test/test_bridgedb_script.py b/bridgedb/test/test_bridgedb_script.py
index 76b4001..b58e016 100644
--- a/bridgedb/test/test_bridgedb_script.py
+++ b/bridgedb/test/test_bridgedb_script.py
@@ -79,6 +79,7 @@ class BridgeDBCliTest(unittest.TestCase):
         if not self.pid or not processExists(self.pid):
             raise SkipTest("Can't run test: no BridgeDB process running.")
 
+        self.doSleep()
         os.unlink(self.assignmentsFile)
         os.kill(self.pid, signal.SIGHUP)
         self.doSleep()





More information about the tor-commits mailing list