diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6289dbcd0..bde80d82c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,48 @@ jobs: - run: poe lint - run: poe build-develop - run: mkdir junit-xml + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 + - run: poe test ${{matrix.pytestExtraArgs}} -k "test_session" -sv --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml + timeout-minutes: 5 - run: poe test ${{matrix.pytestExtraArgs}} -s --junit-xml=junit-xml/${{ matrix.python }}--${{ matrix.os }}.xml timeout-minutes: 15 # Time skipping doesn't yet support ARM diff --git a/tests/helpers/__init__.py b/tests/helpers/__init__.py index 79d3687fd..f9b133987 100644 --- a/tests/helpers/__init__.py +++ b/tests/helpers/__init__.py @@ -92,13 +92,18 @@ async def assert_task_fail_eventually( handle: WorkflowHandle, *, message_contains: Optional[str] = None ) -> None: async def check() -> None: + task_failed = None async for evt in handle.fetch_history_events(): - if evt.HasField("workflow_task_failed_event_attributes") and ( - not message_contains - or message_contains - in evt.workflow_task_failed_event_attributes.failure.message - ): - return + if evt.HasField("workflow_task_failed_event_attributes"): + task_failed = evt + if ( + not message_contains + or message_contains + in evt.workflow_task_failed_event_attributes.failure.message + ): + return + if task_failed: + assert False, f"Task failure not correct: {task_failed.workflow_task_failed_event_attributes.failure.message}" assert False, "Task failure not present" await assert_eventually(check)