Commit e0b1c231 authored by Antoine Pitrou's avatar Antoine Pitrou

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

parent 202b6064
......@@ -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.")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment