Skip to content

Commit cc1d213

Browse files
committed
Skip under Java Test Server
1 parent 54d14a7 commit cc1d213

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/nexus/test_worker.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pytest
99

1010
from temporalio import workflow
11-
from temporalio.client import Client
11+
from temporalio.testing import WorkflowEnvironment
1212
from tests.helpers import new_worker
1313
from tests.helpers.nexus import create_nexus_endpoint, make_nexus_endpoint_name
1414

@@ -36,11 +36,14 @@ async def run(self, id: int) -> None:
3636
[(1, 1, 1), (2, 1, 1), (18, 17, 17), (18, 19, 18)],
3737
)
3838
async def test_max_concurrent_nexus_tasks(
39-
client: Client,
39+
env: WorkflowEnvironment,
4040
max_concurrent_nexus_tasks: int,
4141
num_nexus_operations: int,
4242
expected_num_executed: int,
4343
):
44+
if env.supports_time_skipping:
45+
pytest.skip("Nexus tests don't work with Javas test server")
46+
4447
ids = []
4548
event = asyncio.Event()
4649

@@ -54,16 +57,16 @@ async def op(
5457
await event.wait()
5558

5659
async with new_worker(
57-
client,
60+
env.client,
5861
NexusCallerWorkflow,
5962
nexus_service_handlers=[MaxConcurrentTestService()],
6063
max_concurrent_nexus_tasks=max_concurrent_nexus_tasks,
6164
) as worker:
62-
await create_nexus_endpoint(worker.task_queue, client)
65+
await create_nexus_endpoint(worker.task_queue, env.client)
6366

6467
tasks = [
6568
asyncio.create_task(
66-
client.execute_workflow(
69+
env.client.execute_workflow(
6770
NexusCallerWorkflow.run,
6871
i,
6972
id=str(uuid.uuid4()),

0 commit comments

Comments
 (0)