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

fix(test): converted some MockWebServer to long-running instances #588

Conversation

paullatzelsperger
Copy link
Contributor

@paullatzelsperger paullatzelsperger commented Jul 7, 2023

WHAT

this PR attempts to fix some of the flaky e2e tests we saw in the past.
The problem there was that the MockWebServer could not be started, due to an "Address already in use" error.

We don't exactly know where this is coming from, so this is really more of an "exploratory" PR

It should be noted that this goes somewhat against the recommended use of the MockWebServer, which requires it to be re-instantiated on every test.

WHY

Flaky e2e tests

FURTHER NOTES

other solution ideas are

  • switching to another mockwebserver. In EDC we use the Netty MockServer, which seems to not have these problems.
  • adding a RetryPolicy to the instantiation and starting of the mock webserver: this would guard against transient errors such as timing issues
  • use randomized ports for every instance: would probably the cleanest solution, but might be difficult to implement, since all in-mem runtimes are instantiated only once, and would need to be re-instantiated.

Closes # <-- insert Issue number if one exists

Copy link
Contributor

@wolf4ood wolf4ood left a comment

Choose a reason for hiding this comment

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

🤞

@sonarcloud
Copy link

sonarcloud bot commented Jul 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@paullatzelsperger paullatzelsperger merged commit 7fd2d63 into eclipse-tractusx:main Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

2 participants