Skip to content

Commit 7b5c792

Browse files
committed
Run the test a bunch
1 parent 17d74cf commit 7b5c792

File tree

2 files changed

+30
-32
lines changed

2 files changed

+30
-32
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,51 +74,51 @@ jobs:
7474
- run: poe lint
7575
- run: poe build-develop
7676
- run: mkdir junit-xml
77-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
77+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
7878
timeout-minutes: 5
79-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
79+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
8080
timeout-minutes: 5
81-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
81+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
8282
timeout-minutes: 5
83-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
83+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
8484
timeout-minutes: 5
85-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
85+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
8686
timeout-minutes: 5
87-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
87+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
8888
timeout-minutes: 5
89-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
89+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
9090
timeout-minutes: 5
91-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
91+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
9292
timeout-minutes: 5
93-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
93+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
9494
timeout-minutes: 5
95-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
95+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
9696
timeout-minutes: 5
97-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
97+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
9898
timeout-minutes: 5
99-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
99+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
100100
timeout-minutes: 5
101-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
101+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
102102
timeout-minutes: 5
103-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
103+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
104104
timeout-minutes: 5
105-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
105+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
106106
timeout-minutes: 5
107-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
107+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
108108
timeout-minutes: 5
109-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
109+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
110110
timeout-minutes: 5
111-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
111+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
112112
timeout-minutes: 5
113-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
113+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
114114
timeout-minutes: 5
115-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
115+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
116116
timeout-minutes: 5
117-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
117+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
118118
timeout-minutes: 5
119-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
119+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
120120
timeout-minutes: 5
121-
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_patch_memoized" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
121+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_return_is_honored_when_it_precedes_signal_completion_command" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
122122
timeout-minutes: 5
123123
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
124124
timeout-minutes: 15

tests/worker/test_workflow.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,9 +2930,7 @@ async def waiting_signal() -> bool:
29302930
PatchMemoizedWorkflowUnpatched.waiting_signal
29312931
)
29322932

2933-
print("Waiting for waiting signal")
29342933
await assert_eq_eventually(True, waiting_signal)
2935-
print("Waited for waiting signal")
29362934

29372935
# Now start the worker again, but this time with a patched workflow
29382936
async with Worker(
@@ -2948,19 +2946,12 @@ async def waiting_signal() -> bool:
29482946
task_queue=task_queue,
29492947
)
29502948

2951-
print("Signalling")
2952-
29532949
# Send signal to both and check results
29542950
await pre_patch_handle.signal(PatchMemoizedWorkflowUnpatched.signal)
29552951
await post_patch_handle.signal(PatchMemoizedWorkflowPatched.signal)
29562952

2957-
print("Signalled")
2958-
29592953
# Confirm expected values
29602954
assert ["some-value"] == await pre_patch_handle.result()
2961-
2962-
print("Prepatch complete")
2963-
29642955
assert [
29652956
"pre-patch",
29662957
"some-value",
@@ -6114,19 +6105,26 @@ async def run(self) -> str:
61146105
@workflow.signal
61156106
async def this_signal_executes_first(self):
61166107
self.seen_first_signal = True
6108+
workflow.logger.info("First signal true")
61176109
if self.main_workflow_returns_before_signal_completions:
6110+
workflow.logger.info("Ping pong positive")
61186111
await self.ping_pong(lambda: self.ping_pong_val > 0)
6112+
workflow.logger.info("First signal raise")
61196113
raise ApplicationError(
61206114
"Client should see this error unless doing ping-pong "
61216115
"(in which case main coroutine returns first)"
61226116
)
61236117

61246118
@workflow.signal
61256119
async def this_signal_executes_second(self):
6120+
workflow.logger.info("Second signal wait")
61266121
await workflow.wait_condition(lambda: self.seen_first_signal)
6122+
workflow.logger.info("Second signal true")
61276123
self.seen_second_signal = True
61286124
if self.main_workflow_returns_before_signal_completions:
6125+
workflow.logger.info("Ping pong negative")
61296126
await self.ping_pong(lambda: self.ping_pong_val < 0)
6127+
workflow.logger.info("Second signal raise")
61306128
raise ApplicationError("Client should never see this error!")
61316129

61326130
async def ping_pong(self, cond: Callable[[], bool]):

0 commit comments

Comments
 (0)