Skip to content

Commit

Permalink
Remove max-worker setting from process pool tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cretz committed Sep 25, 2023
1 parent 3363c1f commit 33f30a1
Showing 1 changed file with 9 additions and 27 deletions.
36 changes: 9 additions & 27 deletions tests/worker/test_activity.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ def some_activity() -> str:
return f"activity name: {activity.info().activity_type}"

with pytest.raises(TypeError) as err:
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
await _execute_workflow_with_activity(
client,
worker,
Expand All @@ -218,9 +216,7 @@ def picklable_activity_failure():

async def test_sync_activity_process_failure(client: Client, worker: ExternalWorker):
with pytest.raises(WorkflowFailureError) as err:
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
await _execute_workflow_with_activity(
client,
worker,
Expand Down Expand Up @@ -487,9 +483,7 @@ def picklable_activity_wait_cancel() -> str:


async def test_sync_activity_process_cancel(client: Client, worker: ExternalWorker):
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
result = await _execute_workflow_with_activity(
client,
worker,
Expand All @@ -514,9 +508,7 @@ async def test_sync_activity_process_cancel_uncaught(
client: Client, worker: ExternalWorker
):
with pytest.raises(WorkflowFailureError) as err:
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
await _execute_workflow_with_activity(
client,
worker,
Expand Down Expand Up @@ -727,9 +719,7 @@ async def test_sync_activity_thread_heartbeat_details(
async def test_sync_activity_process_heartbeat_details(
client: Client, worker: ExternalWorker
):
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
result = await _execute_workflow_with_activity(
client,
worker,
Expand All @@ -750,9 +740,7 @@ async def test_sync_activity_process_non_picklable_heartbeat_details(
client: Client, worker: ExternalWorker
):
with pytest.raises(WorkflowFailureError) as err:
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
await _execute_workflow_with_activity(
client,
worker,
Expand Down Expand Up @@ -923,9 +911,7 @@ async def test_sync_activity_process_worker_shutdown_graceful(
client: Client, worker: ExternalWorker
):
act_task_queue = str(uuid.uuid4())
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
act_worker = Worker(
client,
task_queue=act_task_queue,
Expand Down Expand Up @@ -982,9 +968,7 @@ async def test_sync_activity_process_executor_crash(
client: Client, worker: ExternalWorker
):
act_task_queue = str(uuid.uuid4())
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
act_worker = Worker(
client,
task_queue=act_task_queue,
Expand Down Expand Up @@ -1255,9 +1239,7 @@ async def test_sync_activity_dynamic_thread(client: Client, worker: ExternalWork


async def test_sync_activity_dynamic_process(client: Client, worker: ExternalWorker):
with concurrent.futures.ProcessPoolExecutor(
max_workers=default_max_concurrent_activities
) as executor:
with concurrent.futures.ProcessPoolExecutor() as executor:
result = await _execute_workflow_with_activity(
client,
worker,
Expand Down

0 comments on commit 33f30a1

Please sign in to comment.