Skip to content

Commit b7bc6be

Browse files
committed
Unskip update tests under java test server
1 parent 49ca10e commit b7bc6be

File tree

1 file changed

+10
-73
lines changed

1 file changed

+10
-73
lines changed

tests/worker/test_workflow.py

+10-73
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ async def test_workflow_with_codec(client: Client, env: WorkflowEnvironment):
14971497
await test_workflow_signal_and_query(client)
14981498
await test_workflow_signal_and_query_errors(client)
14991499
await test_workflow_simple_activity(client)
1500-
await test_workflow_update_handlers_happy(client, env)
1500+
await test_workflow_update_handlers_happy(client)
15011501

15021502

15031503
class PassThroughCodec(PayloadCodec):
@@ -4273,11 +4273,7 @@ def throws_runtime_err(self) -> None:
42734273
raise RuntimeError("intentional failure")
42744274

42754275

4276-
async def test_workflow_update_handlers_happy(client: Client, env: WorkflowEnvironment):
4277-
if env.supports_time_skipping:
4278-
pytest.skip(
4279-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4280-
)
4276+
async def test_workflow_update_handlers_happy(client: Client):
42814277
async with new_worker(
42824278
client, UpdateHandlersWorkflow, activities=[say_hello]
42834279
) as worker:
@@ -4319,13 +4315,7 @@ async def test_workflow_update_handlers_happy(client: Client, env: WorkflowEnvir
43194315
)
43204316

43214317

4322-
async def test_workflow_update_handlers_unhappy(
4323-
client: Client, env: WorkflowEnvironment
4324-
):
4325-
if env.supports_time_skipping:
4326-
pytest.skip(
4327-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4328-
)
4318+
async def test_workflow_update_handlers_unhappy(client: Client):
43294319
async with new_worker(client, UpdateHandlersWorkflow) as worker:
43304320
handle = await client.start_workflow(
43314321
UpdateHandlersWorkflow.run,
@@ -4398,11 +4388,7 @@ async def test_workflow_update_handlers_unhappy(
43984388
assert "Rejected" == err.value.cause.message
43994389

44004390

4401-
async def test_workflow_update_task_fails(client: Client, env: WorkflowEnvironment):
4402-
if env.supports_time_skipping:
4403-
pytest.skip(
4404-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4405-
)
4391+
async def test_workflow_update_task_fails(client: Client):
44064392
# Need to not sandbox so behavior can change based on globals
44074393
async with new_worker(
44084394
client, UpdateHandlersWorkflow, workflow_runner=UnsandboxedWorkflowRunner()
@@ -4498,13 +4484,7 @@ def got_update(self) -> str:
44984484
return self._got_update
44994485

45004486

4501-
async def test_workflow_update_before_worker_start(
4502-
client: Client, env: WorkflowEnvironment
4503-
):
4504-
if env.supports_time_skipping:
4505-
pytest.skip(
4506-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4507-
)
4487+
async def test_workflow_update_before_worker_start(client: Client):
45084488
# In order to confirm that all started workflows get updates before the
45094489
# workflow completes, this test will start a workflow and start an update.
45104490
# Only then will it start the worker to process both in the task. The
@@ -4572,13 +4552,7 @@ async def signal(self) -> None:
45724552
self._complete_update = True
45734553

45744554

4575-
async def test_workflow_update_separate_handle(
4576-
client: Client, env: WorkflowEnvironment
4577-
):
4578-
if env.supports_time_skipping:
4579-
pytest.skip(
4580-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4581-
)
4555+
async def test_workflow_update_separate_handle(client: Client):
45824556
async with new_worker(client, UpdateSeparateHandleWorkflow) as worker:
45834557
# Start the workflow
45844558
handle = await client.start_workflow(
@@ -4620,14 +4594,7 @@ async def do_update(self, sleep: float) -> None:
46204594
await asyncio.sleep(sleep)
46214595

46224596

4623-
async def test_workflow_update_timeout_or_cancel(
4624-
client: Client, env: WorkflowEnvironment
4625-
):
4626-
if env.supports_time_skipping:
4627-
pytest.skip(
4628-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4629-
)
4630-
4597+
async def test_workflow_update_timeout_or_cancel(client: Client):
46314598
# Confirm start timeout via short timeout on update w/ no worker running
46324599
handle = await client.start_workflow(
46334600
UpdateTimeoutOrCancelWorkflow.run,
@@ -4917,14 +4884,7 @@ async def run(self, scenario: FailureTypesScenario) -> None:
49174884
await super().run(scenario)
49184885

49194886

4920-
async def test_workflow_failure_types_configured(
4921-
client: Client, env: WorkflowEnvironment
4922-
):
4923-
if env.supports_time_skipping:
4924-
pytest.skip(
4925-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
4926-
)
4927-
4887+
async def test_workflow_failure_types_configured(client: Client):
49284888
# Asserter for a single scenario
49294889
async def assert_scenario(
49304890
workflow: Type[FailureTypesWorkflowBase],
@@ -5305,11 +5265,7 @@ async def get_update_id(self) -> str:
53055265
return info.id
53065266

53075267

5308-
async def test_workflow_current_update(client: Client, env: WorkflowEnvironment):
5309-
if env.supports_time_skipping:
5310-
pytest.skip(
5311-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
5312-
)
5268+
async def test_workflow_current_update(client: Client):
53135269
async with new_worker(client, CurrentUpdateWorkflow) as worker:
53145270
handle = await client.start_workflow(
53155271
CurrentUpdateWorkflow.run,
@@ -5386,12 +5342,7 @@ async def my_signal_WARN_AND_ABANDON(self):
53865342
await self._do_update_or_signal()
53875343

53885344

5389-
async def test_unfinished_update_handler(client: Client, env: WorkflowEnvironment):
5390-
skip_unfinished_handler_tests_in_older_python()
5391-
if env.supports_time_skipping:
5392-
pytest.skip(
5393-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
5394-
)
5345+
async def test_unfinished_update_handler(client: Client):
53955346
async with new_worker(client, UnfinishedHandlersWarningsWorkflow) as worker:
53965347
test = _UnfinishedHandlersWarningsTest(client, worker, "update")
53975348
await test.test_wait_all_handlers_finished_and_unfinished_handlers_warning()
@@ -5628,7 +5579,6 @@ async def my_dynamic_signal(self, name: str, args: Sequence[RawValue]) -> None:
56285579
)
56295580
async def test_unfinished_handler_on_workflow_termination(
56305581
client: Client,
5631-
env: WorkflowEnvironment,
56325582
handler_type: Literal["-signal-", "-update-"],
56335583
handler_registration: Literal["-late-registered-", "-not-late-registered-"],
56345584
handler_dynamism: Literal["-dynamic-", "-not-dynamic-"],
@@ -5640,10 +5590,6 @@ async def test_unfinished_handler_on_workflow_termination(
56405590
],
56415591
):
56425592
skip_unfinished_handler_tests_in_older_python()
5643-
if handler_type == "-update-" and env.supports_time_skipping:
5644-
pytest.skip(
5645-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
5646-
)
56475593
await _UnfinishedHandlersOnWorkflowTerminationTest(
56485594
client,
56495595
handler_type,
@@ -5857,12 +5803,7 @@ async def my_update(self) -> str:
58575803

58585804
async def test_update_completion_is_honored_when_after_workflow_return_1(
58595805
client: Client,
5860-
env: WorkflowEnvironment,
58615806
):
5862-
if env.supports_time_skipping:
5863-
pytest.skip(
5864-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
5865-
)
58665807
update_id = "my-update"
58675808
task_queue = "tq"
58685809
wf_handle = await client.start_workflow(
@@ -5915,10 +5856,6 @@ async def test_update_completion_is_honored_when_after_workflow_return_2(
59155856
client: Client,
59165857
env: WorkflowEnvironment,
59175858
):
5918-
if env.supports_time_skipping:
5919-
pytest.skip(
5920-
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
5921-
)
59225859
async with Worker(
59235860
client,
59245861
task_queue="tq",

0 commit comments

Comments
 (0)