Skip to content

Commit dafd5a6

Browse files
[debugging via CI] Temporarily raise with the queue IDs.
1 parent dff841a commit dafd5a6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Lib/test/test_concurrent_futures/test_interpreter_pool.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ def test_blocking(self):
358358
blocker = queues.create()
359359

360360
def run(ready, blocker):
361+
raise Exception((ready.id, blocker.id))
361362
ready.put(None)
362363
blocker.get() # blocking
363364

@@ -369,9 +370,15 @@ def run(ready, blocker):
369370
fut = executor.submit(run, ready, blocker)
370371
futures.append(fut)
371372
assert len(executor._threads) == numtasks, len(executor._threads)
372-
# Unblock the workers.
373-
for i in range(numtasks):
374-
blocker.put_nowait(None)
373+
ctx = None
374+
for i, fut in enumerate(futures, 1):
375+
try:
376+
fut.result(timeout=10)
377+
except Exception as exc:
378+
exc.__cause__ = ctx
379+
ctx = exc
380+
if i == numtasks:
381+
raise Exception((ready.id, blocker.id))
375382
# try:
376383
# # Wait for them all to be ready.
377384
# for i in range(numtasks):

0 commit comments

Comments
 (0)