Skip to content

Commit e3676fa

Browse files
committed
Add debugging
1 parent 3fe7e42 commit e3676fa

File tree

2 files changed

+58
-0
lines changed

2 files changed

+58
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,48 @@ jobs:
7474
- run: poe lint
7575
- run: poe build-develop
7676
- run: mkdir junit-xml
77+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
78+
timeout-minutes: 5
79+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
80+
timeout-minutes: 5
81+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
82+
timeout-minutes: 5
83+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
84+
timeout-minutes: 5
85+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
86+
timeout-minutes: 5
87+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
88+
timeout-minutes: 5
89+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
90+
timeout-minutes: 5
91+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
92+
timeout-minutes: 5
93+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
94+
timeout-minutes: 5
95+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
96+
timeout-minutes: 5
97+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
98+
timeout-minutes: 5
99+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
100+
timeout-minutes: 5
101+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
102+
timeout-minutes: 5
103+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
104+
timeout-minutes: 5
105+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
106+
timeout-minutes: 5
107+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
108+
timeout-minutes: 5
109+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
110+
timeout-minutes: 5
111+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
112+
timeout-minutes: 5
113+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
114+
timeout-minutes: 5
115+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
116+
timeout-minutes: 5
117+
- run: poe test ${{matrix.pytestExtraArgs}} -k "test_workflow_cancel_activity" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
118+
timeout-minutes: 5
77119
- run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml
78120
timeout-minutes: 15
79121
# Time skipping doesn't yet support ARM

tests/worker/test_workflow.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,8 @@ async def test_workflow_cancel_activity(client: Client, local: bool):
949949
async with new_worker(
950950
client, CancelActivityWorkflow, activities=[activity_inst.wait_cancel]
951951
) as worker:
952+
print("Start first workflow")
953+
952954
# Try cancel - confirm error and activity was sent the cancel
953955
handle = await client.start_workflow(
954956
CancelActivityWorkflow.run,
@@ -964,12 +966,18 @@ async def test_workflow_cancel_activity(client: Client, local: bool):
964966
async def activity_result() -> str:
965967
return await handle.query(CancelActivityWorkflow.activity_result)
966968

969+
print("Wait for cancelled")
967970
await assert_eq_eventually(
968971
"Error: CancelledError", activity_result, timeout=assert_timeout
969972
)
973+
974+
print("Wait for activity complete")
970975
await activity_inst.wait_cancel_complete.wait()
976+
977+
print("Wait for workflow cancel")
971978
await handle.cancel()
972979

980+
print("Start second workflow")
973981
# Wait cancel - confirm no error due to graceful cancel handling
974982
handle = await client.start_workflow(
975983
CancelActivityWorkflow.run,
@@ -981,14 +989,18 @@ async def activity_result() -> str:
981989
task_queue=worker.task_queue,
982990
task_timeout=task_timeout,
983991
)
992+
print("Wait for cancelled")
984993
await assert_eq_eventually(
985994
"Got cancelled error, cancelled? True",
986995
activity_result,
987996
timeout=assert_timeout,
988997
)
998+
print("Wait for activity complete")
989999
await activity_inst.wait_cancel_complete.wait()
1000+
print("Wait for workflow cancel")
9901001
await handle.cancel()
9911002

1003+
print("Start third workflow")
9921004
# Abandon - confirm error and that activity stays running
9931005
handle = await client.start_workflow(
9941006
CancelActivityWorkflow.run,
@@ -1000,12 +1012,16 @@ async def activity_result() -> str:
10001012
task_queue=worker.task_queue,
10011013
task_timeout=task_timeout,
10021014
)
1015+
print("Wait for cancelled")
10031016
await assert_eq_eventually(
10041017
"Error: CancelledError", activity_result, timeout=assert_timeout
10051018
)
1019+
print("sleep")
10061020
await asyncio.sleep(0.5)
10071021
assert not activity_inst.wait_cancel_complete.is_set()
1022+
print("Wait for workflow cancel")
10081023
await handle.cancel()
1024+
print("Wait for activity complete")
10091025
await activity_inst.wait_cancel_complete.wait()
10101026

10111027

0 commit comments

Comments
 (0)