Skip to content

Commit 96fe387

Browse files
committed
skip sano tests on the time skipping server
1 parent ca3ce68 commit 96fe387

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

tests/nexus/test_standalone_operations.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ async def test_start_sync_operation_and_get_result(
183183
client: Client, env: WorkflowEnvironment
184184
):
185185
"""Start a sync nexus operation, call handle.result(), verify return value."""
186+
if env.supports_time_skipping:
187+
pytest.skip(
188+
"Standalone Nexus Operation tests don't work with time-skipping server"
189+
)
190+
186191
task_queue = str(uuid.uuid4())
187192
endpoint_name = make_nexus_endpoint_name(task_queue)
188193

@@ -218,6 +223,11 @@ async def test_start_async_operation_and_poll_result(
218223
client: Client, env: WorkflowEnvironment
219224
):
220225
"""Start a workflow_run operation, poll result, verify."""
226+
if env.supports_time_skipping:
227+
pytest.skip(
228+
"Standalone Nexus Operation tests don't work with time-skipping server"
229+
)
230+
221231
task_queue = str(uuid.uuid4())
222232
endpoint_name = make_nexus_endpoint_name(task_queue)
223233

@@ -245,6 +255,11 @@ async def test_start_async_operation_and_poll_result(
245255

246256
async def test_execute_operation(client: Client, env: WorkflowEnvironment):
247257
"""Use execute_operation convenience method, verify it returns result directly."""
258+
if env.supports_time_skipping:
259+
pytest.skip(
260+
"Standalone Nexus Operation tests don't work with time-skipping server"
261+
)
262+
248263
task_queue = str(uuid.uuid4())
249264
endpoint_name = make_nexus_endpoint_name(task_queue)
250265

@@ -273,6 +288,11 @@ async def test_execute_operation(client: Client, env: WorkflowEnvironment):
273288

274289
async def test_errors(client: Client, env: WorkflowEnvironment):
275290
"""Execute operations that raise errors"""
291+
if env.supports_time_skipping:
292+
pytest.skip(
293+
"Standalone Nexus Operation tests don't work with time-skipping server"
294+
)
295+
276296
task_queue = str(uuid.uuid4())
277297
endpoint_name = make_nexus_endpoint_name(task_queue)
278298

@@ -328,6 +348,11 @@ async def test_errors(client: Client, env: WorkflowEnvironment):
328348

329349
async def test_describe_operation(client: Client, env: WorkflowEnvironment):
330350
"""Start op, get result first, then describe, verify fields populated."""
351+
if env.supports_time_skipping:
352+
pytest.skip(
353+
"Standalone Nexus Operation tests don't work with time-skipping server"
354+
)
355+
331356
task_queue = str(uuid.uuid4())
332357
endpoint_name = make_nexus_endpoint_name(task_queue)
333358

@@ -378,6 +403,11 @@ async def test_cancel_operation(client: Client, env: WorkflowEnvironment):
378403
"""Start blocking async op, cancel it, verify awaiting result raises NexusOperationFailureError
379404
from a CancelledError.
380405
"""
406+
if env.supports_time_skipping:
407+
pytest.skip(
408+
"Standalone Nexus Operation tests don't work with time-skipping server"
409+
)
410+
381411
task_queue = str(uuid.uuid4())
382412
endpoint_name = make_nexus_endpoint_name(task_queue)
383413

@@ -415,6 +445,11 @@ async def test_terminate_operation(client: Client, env: WorkflowEnvironment):
415445
"""Start blocking async op, terminate it, verify awaiting the result raises NexusOperationFailureError
416446
from a TerminatedError.
417447
"""
448+
if env.supports_time_skipping:
449+
pytest.skip(
450+
"Standalone Nexus Operation tests don't work with time-skipping server"
451+
)
452+
418453
task_queue = str(uuid.uuid4())
419454
endpoint_name = make_nexus_endpoint_name(task_queue)
420455

@@ -450,6 +485,11 @@ async def test_terminate_operation(client: Client, env: WorkflowEnvironment):
450485

451486
async def test_list_operations(client: Client, env: WorkflowEnvironment):
452487
"""Start multiple ops, list them, verify iteration yields correct results."""
488+
if env.supports_time_skipping:
489+
pytest.skip(
490+
"Standalone Nexus Operation tests don't work with time-skipping server"
491+
)
492+
453493
task_queue = str(uuid.uuid4())
454494
endpoint_name = make_nexus_endpoint_name(task_queue)
455495

@@ -493,6 +533,11 @@ async def check_ids() -> None:
493533

494534
async def test_count_operations(client: Client, env: WorkflowEnvironment):
495535
"""Start ops, count, verify count."""
536+
if env.supports_time_skipping:
537+
pytest.skip(
538+
"Standalone Nexus Operation tests don't work with time-skipping server"
539+
)
540+
496541
task_queue = str(uuid.uuid4())
497542
endpoint_name = make_nexus_endpoint_name(task_queue)
498543

@@ -531,6 +576,11 @@ async def check_count() -> None:
531576

532577
async def test_get_nexus_operation_handle(client: Client, env: WorkflowEnvironment):
533578
"""Start op, get result, then get handle by ID and get result again."""
579+
if env.supports_time_skipping:
580+
pytest.skip(
581+
"Standalone Nexus Operation tests don't work with time-skipping server"
582+
)
583+
534584
task_queue = str(uuid.uuid4())
535585
endpoint_name = make_nexus_endpoint_name(task_queue)
536586

@@ -573,6 +623,11 @@ async def test_id_conflict_policy_use_existing(
573623
client: Client, env: WorkflowEnvironment
574624
):
575625
"""Start op, re-start with USE_EXISTING, verify same op/run ID and expected result"""
626+
if env.supports_time_skipping:
627+
pytest.skip(
628+
"Standalone Nexus Operation tests don't work with time-skipping server"
629+
)
630+
576631
task_queue = str(uuid.uuid4())
577632
endpoint_name = make_nexus_endpoint_name(task_queue)
578633

@@ -633,6 +688,11 @@ async def test_id_conflict_policy_use_existing(
633688

634689
async def test_id_conflict_policy_fail(client: Client, env: WorkflowEnvironment):
635690
"""Start op, re-start with FAIL, verify raises NexusOperationAlreadyStartedError."""
691+
if env.supports_time_skipping:
692+
pytest.skip(
693+
"Standalone Nexus Operation tests don't work with time-skipping server"
694+
)
695+
636696
task_queue = str(uuid.uuid4())
637697
endpoint_name = make_nexus_endpoint_name(task_queue)
638698

@@ -742,6 +802,11 @@ def intercept_client(self, next: OutboundInterceptor) -> OutboundInterceptor:
742802

743803
async def test_interceptor_receives_inputs(client: Client, env: WorkflowEnvironment):
744804
"""Custom OutboundInterceptor records calls, verify correct input types."""
805+
if env.supports_time_skipping:
806+
pytest.skip(
807+
"Standalone Nexus Operation tests don't work with time-skipping server"
808+
)
809+
745810
task_queue = str(uuid.uuid4())
746811
endpoint_name = make_nexus_endpoint_name(task_queue)
747812

0 commit comments

Comments
 (0)