Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unskip update tests under java test server #142

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions tests/hello/hello_update_test.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import uuid

import pytest
from temporalio.client import Client, WorkflowExecutionStatus
from temporalio.testing import WorkflowEnvironment
from temporalio.worker import Worker

from hello.hello_update import GreetingWorkflow


async def test_update_workflow(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Time-skipping test server currently has issue with update: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_update_workflow(client: Client):
task_queue_name = str(uuid.uuid4())
async with Worker(client, task_queue=task_queue_name, workflows=[GreetingWorkflow]):
handle = await client.start_workflow(
Expand Down
27 changes: 4 additions & 23 deletions tests/message_passing/introduction/test_introduction_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pytest
from temporalio.client import Client, WorkflowUpdateFailedError
from temporalio.testing import WorkflowEnvironment
from temporalio.worker import Worker

from message_passing.introduction.starter import TASK_QUEUE
Expand All @@ -14,11 +13,7 @@
)


async def test_queries(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_queries(client: Client):
async with Worker(
client,
task_queue=TASK_QUEUE,
Expand Down Expand Up @@ -46,11 +41,7 @@ async def test_queries(client: Client, env: WorkflowEnvironment):
]


async def test_set_language(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_set_language(client: Client):
async with Worker(
client,
task_queue=TASK_QUEUE,
Expand All @@ -69,11 +60,7 @@ async def test_set_language(client: Client, env: WorkflowEnvironment):
assert await wf_handle.query(GreetingWorkflow.get_language) == Language.CHINESE


async def test_set_invalid_language(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_set_invalid_language(client: Client):
async with Worker(
client,
task_queue=TASK_QUEUE,
Expand All @@ -92,17 +79,11 @@ async def test_set_invalid_language(client: Client, env: WorkflowEnvironment):
)


async def test_set_language_that_is_only_available_via_remote_service(
client: Client, env: WorkflowEnvironment
):
async def test_set_language_that_is_only_available_via_remote_service(client: Client):
"""
Similar to test_set_invalid_language, but this time Arabic is available
since we use the remote service.
"""
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async with Worker(
client,
task_queue=TASK_QUEUE,
Expand Down
18 changes: 3 additions & 15 deletions tests/message_passing/safe_message_handlers/workflow_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
)


async def test_safe_message_handlers(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_safe_message_handlers(client: Client):
task_queue = f"tq-{uuid.uuid4()}"
async with Worker(
client,
Expand Down Expand Up @@ -72,11 +68,7 @@ async def test_safe_message_handlers(client: Client, env: WorkflowEnvironment):
assert result.num_currently_assigned_nodes == 0


async def test_update_idempotency(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_update_idempotency(client: Client):
task_queue = f"tq-{uuid.uuid4()}"
async with Worker(
client,
Expand Down Expand Up @@ -111,11 +103,7 @@ async def test_update_idempotency(client: Client, env: WorkflowEnvironment):
assert result_1.nodes_assigned >= result_2.nodes_assigned


async def test_update_failure(client: Client, env: WorkflowEnvironment):
if env.supports_time_skipping:
pytest.skip(
"Java test server: https://github.com/temporalio/sdk-java/issues/1903"
)
async def test_update_failure(client: Client):
task_queue = f"tq-{uuid.uuid4()}"
async with Worker(
client,
Expand Down
Loading