-
Notifications
You must be signed in to change notification settings - Fork 99
Make each product use their own gRPC Device Server ports in the System Tests #2086
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
0847504 to
47b8d04
Compare
|
Note that I'm not 100% sure yet that each product doesn't run multiple gRPC tests simultaneously |
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #2086 +/- ##
=======================================
Coverage 91.34% 91.35%
=======================================
Files 66 66
Lines 16292 16292
=======================================
+ Hits 14882 14883 +1
+ Misses 1410 1409 -1
Flags with carried forward coverage won't be shown. Click here to find out more. see 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Despite claims to the contrary in the niscope system tests, I'm pretty sure we don't parallelize execution of a tests for a given API. The "parallel-mode" argument passed to In order to run tests in parallel for an API, we would need to be using xdist. |
| @@ -0,0 +1,9 @@ | |||
| { | |||
| "address": "[::1]", | |||
| "port": 31760, | |||
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.
FYI, you can configure it to use a dynamic port and read the port number from stdout. That's what InstrumentStudio's GrpcDeviceServerActivationService does.
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.
We considered it, but we felt this was safer, particularly with multiple instances of gRPC Device Server being kicked off at the same time. Our internal VM Build process launches up to 4 instances at once, repeatedly while testing up to 4 APIs in parallel, so they could, theoretically pick the same port.
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.
That shouldn't happen. The server specifies a listening port of 0 when calling bind(), which tells the OS to allocate a port from the ephemeral port range. Then the server asks the OS which port it's using and prints that port number to stdout. This should only fail when all of the ports in the ephemeral port range are in use (and there are thousands of these).
- [ ] I've updated CHANGELOG.md if applicable.- [ ] I've added tests applicable for this pull requestWhat does this Pull Request accomplish?
Several different gRPC device server processes are created when running system tests, but all these different processes default to the same port, 31763. This collision is causing tests to fail to run.
List issues fixed by this Pull Request below, if any.
AB#3048787
What testing has been done?