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

test: Fix node integration tests sharing SDK initializations #5715

Merged
merged 3 commits into from
Sep 12, 2022

Conversation

lforst
Copy link
Member

@lforst lforst commented Sep 9, 2022

While working on baggage changes and running the Node.js integration tests, I noticed that integrations were set up N times where N is the number of test suites there were.

I believe we do not want to share global context (i.e. SDK inits) across integration tests since that is not really simulating a real-world scenario.

By removing the --runInBand we will not run the tests in a single process anymore but in multiple worker processes. This is a bit slower so I also increased the test timeout. I raised it by quite a lot, hoping to reduce test flakes in the future.

Also, there was some weird race condition/deadlock in the logic where we get a free port on the machine I aim to fix with this PR. TBH I don't quite know why it works but it seems to improve things when running locally.

@lforst lforst changed the title fix(tests): Fix node integration tests sharing SDK initializations test: Fix node integration tests sharing SDK initializations Sep 9, 2022
@lforst lforst marked this pull request as ready for review September 9, 2022 12:34
Copy link

@ProKashif ProKashif left a comment

Choose a reason for hiding this comment

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

LGTM ✅

@lforst lforst merged commit 1c566b5 into master Sep 12, 2022
@lforst lforst deleted the lforst-fix-node-integration-tests branch September 12, 2022 07:39
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.

3 participants