chore: reduce flakiness for test api equivalence spec#6955
Merged
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
This comment has been minimized.
This comment has been minimized.
| @@ -27,10 +30,11 @@ describe('snyk test — unified test API equivalence (FF off vs on)', () => { | |||
| beforeAll((done) => { | |||
| const port = getServerPort(process); | |||
Contributor
There was a problem hiding this comment.
Question: why not exchange the deprecated method as well and use getAvailableServerPort()?
| ...process.env, | ||
| SNYK_API: 'http://localhost:' + port + baseApi, | ||
| SNYK_HOST: 'http://localhost:' + port, | ||
| SNYK_API: `http://${fakeServerIp}:${port}${baseApi}`, |
Contributor
There was a problem hiding this comment.
Question: Is there any explanation why this change has an effect on flakiness?
Contributor
There was a problem hiding this comment.
In general it is the right move to use this pattern but for other reasons then flakiness in my understanding.
Contributor
Contributor
There was a problem hiding this comment.
I was writing a comment here, it turned to be the same as this
For the flakiness, it might be the timeout increase to fix it
Contributor
There was a problem hiding this comment.
yes, I added the timeout ;)
3a11961 to
5f57ac5
Compare
This comment has been minimized.
This comment has been minimized.
5f57ac5 to
fbbf420
Compare
fbbf420 to
a13259c
Compare
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
PeterSchafer
approved these changes
Jun 27, 2026
danskmt
approved these changes
Jun 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Swap out the "localhost" for the IPv4 address to reduce the flakiness for the test-api-equivalence acceptance tests.
Where should the reviewer start?
test/jest/acceptance/snyk-test/unified-test-api-equivalence.spec.tsHow should this be manually tested?
What's the product update that needs to be communicated to CLI users?
N/A - CI fix only.