Skip to content

fix race in TestGetTaskQueueUserData_LongPoll_WakesUp_From2to3#10538

Open
moody-temporal wants to merge 4 commits into
temporalio:mainfrom
moody-temporal:fix-data-race-in-matching-tests
Open

fix race in TestGetTaskQueueUserData_LongPoll_WakesUp_From2to3#10538
moody-temporal wants to merge 4 commits into
temporalio:mainfrom
moody-temporal:fix-data-race-in-matching-tests

Conversation

@moody-temporal
Copy link
Copy Markdown
Contributor

We can't run s.NoError() from within the child goroutine, instead make a channel and just chuck it over to the main thread.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

We can't run s.NoError() from within the child goroutine, instead
make a channel and just chuck it over to the main thread.
@moody-temporal moody-temporal requested a review from a team as a code owner June 4, 2026 21:56
Comment on lines 2700 to 2720
@@ -2715,7 +2716,7 @@ func (s *matchingEngineSuite) TestGetTaskQueueUserData_LongPoll_WakesUp_FromNoth
},
},
})
s.NoError(err)
updateErrCh <- err
}()
Copy link
Copy Markdown
Contributor

@stephanos stephanos Jun 4, 2026

Choose a reason for hiding this comment

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

actually - why not use eventually/await? it does the same thing under the hood but safer (has timeout etc)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gave that a go, caused a bit more of a refactor than I would have liked but I think the result is better

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