Skip to content

Commit

Permalink
Skip tests under Java test server
Browse files Browse the repository at this point in the history
  • Loading branch information
dandavison committed Dec 19, 2024
1 parent 5a06a6a commit 74e009f
Showing 1 changed file with 38 additions and 6 deletions.
44 changes: 38 additions & 6 deletions tests/worker/test_update_with_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
WorkflowIDConflictPolicy,
)
from temporalio.exceptions import ApplicationError, WorkflowAlreadyStartedError
from temporalio.testing import WorkflowEnvironment
from tests.helpers import (
new_worker,
)
Expand Down Expand Up @@ -87,8 +88,15 @@ class TestUpdateWithStart:
[WorkflowUpdateStage.ACCEPTED, WorkflowUpdateStage.COMPLETED],
)
async def test_non_blocking_update_with_must_create_workflow_semantics(
self, client: Client, wait_for_stage: WorkflowUpdateStage
self,
client: Client,
env: WorkflowEnvironment,
wait_for_stage: WorkflowUpdateStage,
):
if env.supports_time_skipping:
pytest.skip(
"TODO: make update_with_start_tests pass under Java test server"
)
await self._do_test(
client,
f"test-uws-nb-mc-wf-id-{wait_for_stage.name}",
Expand All @@ -103,8 +111,15 @@ async def test_non_blocking_update_with_must_create_workflow_semantics(
[WorkflowUpdateStage.ACCEPTED, WorkflowUpdateStage.COMPLETED],
)
async def test_non_blocking_update_with_get_or_create_workflow_semantics(
self, client: Client, wait_for_stage: WorkflowUpdateStage
self,
client: Client,
env: WorkflowEnvironment,
wait_for_stage: WorkflowUpdateStage,
):
if env.supports_time_skipping:
pytest.skip(
"TODO: make update_with_start_tests pass under Java test server"
)
await self._do_test(
client,
f"test-uws-nb-goc-wf-id-{wait_for_stage.name}",
Expand All @@ -119,8 +134,15 @@ async def test_non_blocking_update_with_get_or_create_workflow_semantics(
[WorkflowUpdateStage.ACCEPTED, WorkflowUpdateStage.COMPLETED],
)
async def test_blocking_update_with_get_or_create_workflow_semantics(
self, client: Client, wait_for_stage: WorkflowUpdateStage
self,
client: Client,
env: WorkflowEnvironment,
wait_for_stage: WorkflowUpdateStage,
):
if env.supports_time_skipping:
pytest.skip(
"TODO: make update_with_start_tests pass under Java test server"
)
await self._do_test(
client,
f"test-uws-b-goc-wf-id-{wait_for_stage.name}",
Expand Down Expand Up @@ -286,7 +308,11 @@ def assert_network_call(
assert _wrapped_poll.called == expect_network_call


async def test_update_with_start_sets_first_execution_run_id(client: Client):
async def test_update_with_start_sets_first_execution_run_id(
client: Client, env: WorkflowEnvironment
):
if env.supports_time_skipping:
pytest.skip("TODO: make update_with_start_tests pass under Java test server")
async with new_worker(
client,
WorkflowForUpdateWithStartTest,
Expand Down Expand Up @@ -360,12 +386,16 @@ def make_start_op(workflow_id: str):
assert (await start_op_4.workflow_handle()).first_execution_run_id is not None


async def test_update_with_start_failure_start_workflow_error(client: Client):
async def test_update_with_start_failure_start_workflow_error(
client: Client, env: WorkflowEnvironment
):
"""
When the workflow start fails, the update_with_start_call should raise the appropriate
gRPC error, and the start_workflow_operation promise should be rejected with the same
error.
"""
if env.supports_time_skipping:
pytest.skip("TODO: make update_with_start_tests pass under Java test server")
async with new_worker(
client,
WorkflowForUpdateWithStartTest,
Expand Down Expand Up @@ -439,8 +469,10 @@ async def my_update(self, arg: str) -> str:


async def test_update_with_start_client_outbound_interceptor(
client: Client,
client: Client, env: WorkflowEnvironment
):
if env.supports_time_skipping:
pytest.skip("TODO: make update_with_start_tests pass under Java test server")
interceptor = SimpleClientInterceptor()
client = Client(**{**client.config(), "interceptors": [interceptor]}) # type: ignore

Expand Down

0 comments on commit 74e009f

Please sign in to comment.