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

Fix flaky test #1201

Merged
merged 4 commits into from Dec 5, 2022
Merged

Fix flaky test #1201

merged 4 commits into from Dec 5, 2022

Conversation

mindaugasbarcauskas
Copy link
Contributor

What changed?

Fixing flaky integration test since master build was failing. Test was flaky because it was testing that child workflow gets terminated when parent workflow finishes. The test was running into race condition.

Why?

How did you test it?
pipeline run.

Potential risks

test/integration_test.go Outdated Show resolved Hide resolved
test/integration_test.go Outdated Show resolved Hide resolved
Comment on lines 593 to 594
var val interface{}
return wfRun.Get(ctx, &val)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var val interface{}
return wfRun.Get(ctx, &val)
return wfRun.Get(ctx, nil)

Comment on lines 422 to 423
resp, err := ts.libClient.DescribeWorkflowExecution(context.Background(), childWorkflowID, "")
ts.NoError(err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably not necessary any more? I don't think GetWorkflow needs a runid anyway...

Copy link
Contributor

@Groxx Groxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, makes sense that this'd be racy since child-wf-close isn't transactional.
I'd do some small cleanups, but they're pretty foolproof, so 👍-ing now.

@mindaugasbarcauskas mindaugasbarcauskas merged commit b67861e into master Dec 5, 2022
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.

None yet

3 participants