-
Notifications
You must be signed in to change notification settings - Fork 235
tests: make another pass at cleaning up flaky tests #1537
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
Conversation
summer-ji-eng
left a comment
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.
Not enough context on the business, but the typescript syntax and overall test looks good to me.
| let nextTopicId = 0; | ||
| async function createTopic(): Promise<Topic> { | ||
| const id = `${topicNameStem}-${nextTopicId++}`; | ||
| console.log(`Subscriptions runId: ${runId}`); |
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.
Is this console.log intention?
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.
Yep! It's for debug purposes in case there are test failures or leftover topics. (We do it in several of the test suites, so should be okay here.)
Some of the tests were still being flaky. This should be a big enough hammer to fix it, hopefully.
Larger explanation: some earlier changes I made to make the cleanup of tests more deterministic actually ended up making them flaky. This change wraps each test with its own cleanup that looks for items specifically for that test, so the tests won't interrupt each other when running concurrently.
Fixes #1498 🦕