We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a51f51 commit f649f7bCopy full SHA for f649f7b
1 file changed
tests/test_concurrency.py
@@ -21,11 +21,14 @@ def test_success_and_failure_isolation(self):
21
manager = multiprocessing.Manager()
22
success_counter = manager.Value("i", 0)
23
fail_counter = manager.Value("i", 0)
24
+ process_index = manager.Value("i", 0)
25
lock = manager.Lock()
26
27
def fake_bootstrap_run(handler, lambda_runtime_client):
- pid = multiprocessing.current_process().pid
28
- if pid % 2 == 0:
+ with lock:
29
+ idx = process_index.value
30
+ process_index.value += 1
31
+ if idx % 2 == 0:
32
for _ in range(3):
33
with lock:
34
success_counter.value += 1
0 commit comments