chore: allow custom port in samples tests#272
chore: allow custom port in samples tests#272DominicKramer merged 1 commit intogoogleapis:masterfrom
Conversation
This allows multiple runs of the samples tests to occur on the same machine at the same time to test for conflicts between concurrently running tests.
There was a problem hiding this comment.
How will this actually help us in the tests? Seems like it would be better to have the quickstart main method accept the port as a command line arg, then choose a high order random port in the test to pass to the sample. I don't think we want to use an env var here.
Codecov Report
@@ Coverage Diff @@
## master #272 +/- ##
=======================================
Coverage 94.87% 94.87%
=======================================
Files 2 2
Lines 78 78
Branches 8 8
=======================================
Hits 74 74
Misses 4 4Continue to review full report at Codecov.
|
|
@JustinBeckwith For the record, I think this is a pretty standard thing to do that I've seen in other samples (using env var). |
|
@JustinBeckwith I'm fine using an env var or as a program argument. This PR itself doesn't fix any issues in the test. However, when trying them locally it is nice to have multiple instance running concurrently to test for issues. Having the port adjustable makes that easier. |
JustinBeckwith
left a comment
There was a problem hiding this comment.
Got it. If the goal is to make the tests more reliable, this isn't gonna help. But if the goal was just allow setting the port locally, LGTM.
This allows multiple runs of the samples tests to occur on the
same machine at the same time to test for conflicts between
concurrently running tests.