Try to make test_threaded_import faster and safer (issue #15599).

This commit is contained in:
Antoine Pitrou 2012-12-18 23:04:10 +01:00
commit 1688812894
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ class Finder:
with self.lock:
self.numcalls += 1
x = self.x
time.sleep(0.1)
time.sleep(0.01)
self.x = x + 1
class FlushingFinder:
@ -117,7 +117,7 @@ class ThreadedImportTests(unittest.TestCase):
t = threading.Thread(target=task,
args=(N, done, done_tasks, errors,))
t.start()
done.wait(60)
self.assertTrue(done.wait(60))
self.assertFalse(errors)
if verbose:
print("OK.")