I have pytest that use the Replayer with history loaded from a json file downloaded from the UI. The tests are running as expected and passing.
However I get the following output
tests/test_workflow_history.py::test_nondeterminism_workflow_history_for_v1_0 PASSED [ 50%]
----------------------------- live log teardown -----------------------------
17:11:33 [ ERROR] Task was destroyed but it is pending!
task: <Task pending name='Task-39' coro=<<async_generator_athrow without __name__>()>> (base_events.py:1771)
tests/test_workflow_history.py::test_nondeterminism_workflow_history_for_v1_1_patch_MovedThankYouAfterLoop PASSED [100%]
----------------------------- live log teardown -----------------------------
17:11:33 [ ERROR] Task was destroyed but it is pending!
task: <Task pending name='Task-78' coro=<<async_generator_athrow without __name__>()>> (base_events.py:1771)
Here is the pytest code
@pytest.mark.asyncio
async def test_nondeterminism_workflow_history_for_v1_0() -> None:
replayer = Replayer(workflows=[LoanProcessingWorkflow])
await replayer.replay_workflow(
WorkflowHistory.from_json(
workflow_id="loan-processing-workflow-a100",
history=json.load(open("temporal/history/loan_workflow_v1_0.json")),
)
)
@pytest.mark.asyncio
async def test_nondeterminism_workflow_history_for_v1_1_patch_MovedThankYouAfterLoop() -> None:
replayer = Replayer(workflows=[LoanProcessingWorkflow])
await replayer.replay_workflow(
WorkflowHistory.from_json(
workflow_id="loan-processing-workflow-a100",
history=json.load(open("temporal/history/loan_workflow_v1_1.json")),
)
)
Is the error anything to be concerned about? Any way to resolve it? Removing the asyncio marker does not make a difference.