Anonymous avatar Anonymous committed 645fbce

Fix up tests so they run on a slower virtual machine

Comments (0)

Files changed (1)

tests/zmq_test.py

         self.assertEqual(rx_count, 50)
 
 
-
-        
-
-
-
-
-
-
-
-
-
-
-
-
-        
-
 class TestThreadedContextAccess(TestCase):
     """zmq's Context must be unique within a hub
 
         context = get_hub().get_context()
         test_result = []
         def assert_different(ctx):
-            assert not hasattr(_threadlocal, 'hub')
-            import os
-            os.environ['EVENTLET_HUB'] = 'zeromq'
+#            assert not hasattr(_threadlocal, 'hub')
+#            import os
+#            os.environ['EVENTLET_HUB'] = 'zeromq'
             hub = get_hub()
             try:
                 this_thread_context = hub.get_context()
                 raise
             test_result.append(ctx is this_thread_context)
         Thread(target=assert_different, args=(context,)).start()
-        count = 0
-        while count < 100 and not test_result:
-            count += 1
+        while not test_result:
+            sleep(0.1)
         self.assertFalse(test_result[0])
 
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.