-
-
Notifications
You must be signed in to change notification settings - Fork 404
Added MILL_TEST_FREE_PORT #4931
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
base: main
Are you sure you want to change the base?
Conversation
RE: There is some failing tests on HEAD right now. I think
Might be related to the PR but im not sure. I will be investigating, |
/** | ||
* Used to store free ports for Mill's tests to use. | ||
*/ | ||
public static final String MILL_TEST_FREE_PORT = "MILL_TEST_FREE_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.
Is this a single port or multiple. The comment is a bit vague. If it is multi, that the variable should be MILL_TEST_FREE_PORTS
and we should document here, which separator is used.
var i = 0 | ||
var ports = Set.empty[Int] | ||
for (_ <- 1 to 100) { | ||
if (i == 6) { |
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.
Magic number 6
! A parameter or a named constant might be better.
This doesn't satisfy the original issue
|
I misunderstood, I thought that were to be done in a second PR. I will work on this. |
So there is numerous limitations with what I have here.
I experimented with adding some code in ExecutionImpl, thats where it could be managed if I knew
Still, you can easily add some code to Task.Command {} (and I did) To allow a centrally managed Port dispatcher for those Regardless, I did manage to replace hard coded ports for most of the TESTS. However, there is still the chance there can be conflicting ports. |
I must admit I am having trouble following the code. There's a bunch of random As far as I can tell, the current implementation is unique to UTestExampleTestSuite. We should try and make it work with any |
I will mark as WIP until I figure out a way to make it work with all Tasks |
Removed unused envvar
Made in accordance to #3802