We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8a0823d commit 2a96ae2Copy full SHA for 2a96ae2
tests/test_session.py
@@ -56,9 +56,15 @@ def test_session_multiple_threads():
56
threads.append(t)
57
t.start()
58
59
- for t in threads:
60
- t.join(1)
61
- assert not t.is_alive()
+ loopcount = 0
+ max_loops = len(threads) * 2
+ while len(threads):
62
+ threads[0].join(1)
63
+ if not threads[0].is_alive():
64
+ threads.pop(0)
65
+ loopcount += 1
66
+ if loopcount > max_loops:
67
+ pytest.fail("Threads did not complete")
68
69
assert len(clients) == num_tasks
70
assert len({id(s) for s in clients}) == 10
0 commit comments