Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust startedCount assertion in Test_WorkflowLocalActivityWithMockAndListeners #1353

Merged
merged 2 commits into from
Jul 3, 2024

Conversation

natemort
Copy link
Member

@natemort natemort commented Jul 2, 2024

Execution of the LocalActivities happens asynchronously from the workflow execution. If the local activity has already been canceled by the time it goes to start the activity then the started listener is never invoked, and the test observes only a single activity being started. This is valid as the Workflow is written so adjust the assertion against it.

This seems to be happening more frequently after we migrated our CI, internal reference CDNC-9656

What changed?

  • Allow 1 or 2 as valid results for startedCount

Why?

  • Reduce test flakiness

How did you test it?

  • Running the test

Potential risks

…dListeners

Execution of the LocalActivities happens asynchronously from the workflow execution. If the local activity has already been canceled by the time it goes to start the activity then the started listener is never invoked, and the test observes only a single activity being started. This is valid as the Workflow is written so adjust the assertion against it.
@natemort natemort merged commit 6db0afa into cadence-workflow:master Jul 3, 2024
11 checks passed
mrombout pushed a commit to softsense/cadence-client that referenced this pull request Feb 26, 2025
…dListeners (cadence-workflow#1353)

Execution of the LocalActivities happens asynchronously from the workflow execution. If the local activity has already been canceled by the time it goes to start the activity then the started listener is never invoked, and the test observes only a single activity being started. This is valid as the Workflow is written so adjust the assertion against it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants