Skip to content

Conversation

@feywind
Copy link
Collaborator

@feywind feywind commented Apr 26, 2022

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 🦕

@feywind feywind requested review from a team as code owners April 26, 2022 14:55
@product-auto-label product-auto-label bot added size: xl Pull request size is extra large. api: pubsub Issues related to the googleapis/nodejs-pubsub API. labels Apr 26, 2022
@feywind feywind added the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 26, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Apr 26, 2022
@feywind feywind added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 26, 2022
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Apr 26, 2022
Copy link
Contributor

@summer-ji-eng summer-ji-eng left a 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}`);
Copy link
Contributor

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?

Copy link
Collaborator Author

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.)

@feywind feywind merged commit 80adb0a into main Apr 26, 2022
@feywind feywind deleted the flaky-tests-2 branch April 26, 2022 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: pubsub Issues related to the googleapis/nodejs-pubsub API. size: xl Pull request size is extra large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

subscriptions: should create a subscription with filtering failed

3 participants