-
Notifications
You must be signed in to change notification settings - Fork 805
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
Conversation
@@ -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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idem
There was a problem hiding this 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!
What changed?
Why?
The tests have race conditions.
How did you test it?
Potential risks
Release notes
Documentation Changes