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 flacky integration tests #4094

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

Shaddoll
Copy link
Member

What changed?

Why?
The tests have race conditions.

How did you test it?

Potential risks

Release notes

Documentation Changes

@Shaddoll Shaddoll requested a review from a team March 30, 2021 21:55
@@ -613,7 +615,7 @@ func (s *IntegrationSuite) TestQueryWorkflow_Consistent_PiggybackQuery() {
} else if previousStartedEventID > 0 {
for _, event := range history.Events[previousStartedEventID:] {
if *event.EventType == types.EventTypeWorkflowExecutionSignaled {
handledSignal = true
handledSignal.Store(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: do we need to be sure to set it just once? then please consider sync.Once

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it needs to be set just once.

@@ -961,7 +964,7 @@ func (s *IntegrationSuite) TestQueryWorkflow_Consistent_BlockedByStarted_NonStic
if *event.EventType == types.EventTypeWorkflowExecutionSignaled {
// wait for some time to force decision task to stay in started state while query is issued
<-time.After(5 * time.Second)
handledSignal = true
handledSignal.Store(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

idem

@@ -1149,7 +1153,7 @@ func (s *IntegrationSuite) TestQueryWorkflow_Consistent_NewDecisionTask_Sticky()
if *event.EventType == types.EventTypeWorkflowExecutionSignaled {
// wait for some time to force decision task to stay in started state while query is issued
<-time.After(5 * time.Second)
handledSignal = true
handledSignal.Store(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

idem

Copy link
Contributor

@mkolodezny mkolodezny left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this!

@Shaddoll Shaddoll merged commit 5a10dc4 into cadence-workflow:master Mar 30, 2021
yux0 pushed a commit to yux0/cadence that referenced this pull request May 4, 2021
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