Skip to content

Commit 8fb5f58

Browse files
trygveucursoragent
andauthored
fix: avoid flaky workflow execution list test by comparing IDs (#2488)
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6c02aac commit 8fb5f58

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/tests_integration/test_api/test_workflows.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,9 @@ def test_list_workflow_executions(
577577
listed = cognite_client.workflows.executions.list(
578578
workflow_version_ids=workflow_execution_list[0].as_workflow_id()
579579
)
580-
581-
unittest.TestCase().assertCountEqual(listed, workflow_execution_list)
580+
# Compare by ID: cancel() can return before fields like end_time are
581+
# finalized server-side, so full-object equality is flaky.
582+
assert {e.id for e in listed} == {e.id for e in workflow_execution_list}
582583

583584
def test_list_workflow_executions_by_status(
584585
self,

0 commit comments

Comments
 (0)