test: moved dgram bind shared ports to sequential#12999
test: moved dgram bind shared ports to sequential#12999arturgvieira-zz wants to merge 1 commit intonodejs:masterfrom arturgvieira-zz:commonPort08-branch
Conversation
|
I'm not 100% on this one, just because of the necessity for the +1 mechanism, any advice would be appreciated. |
There was a problem hiding this comment.
If I'm reading the test correctly this can't be a dynamic port as the same port should be used by the two workers.
|
I think it's better to move this test in |
|
This patch does seem to work on my machine, not sure how. EDIT: That is to say, the test does pass. |
|
@gibfahn yes but I think it is not doing what the test is supposed to do, which is testing the |
|
Got it, I'll await feedback and go from there. |
|
No problem. |
|
In the other PR, is it not landing because it would be preferred to use process.send . I can make that edit if it solves this issue. |
|
#12452 seems ready to go apart from the merge conflicts. |
|
Yeah, it looks like the PR may have gone inactive. I'll wait for a little more info. |
|
@lpinca Ok, so I'm starting to understand the exclusive property better. I understand what you mean by the exclusive property not being utilized. So in my tests second round, it picks a new port and it does not conflict as it should. Is that deduction correct? |
|
Yup. |
|
Ok thank you |
|
I'm checking and I am getting that it is picking the same port, both times. @lpinca could you confirm? by adding: |
|
I started to reverse the changes in my local branch and debugged first with common.PORT then with an initial dynamic port. Results are similar. |
|
Would that behavior scale? I'm not sure, technically speaking. So I will stand by for further review and feedback. It's all the same to me. |
|
@arturgvieira you are right, it seems to pick up the same port also when using |
|
@lpinca I made some changes. This will get assigned a random port then maintain that port for the collision testing. Let me know what you think. I'm not sure how to remove the + 1 though. I tried and it lost the port collision issue. |
There was a problem hiding this comment.
There is no guarantee that this port is not being used by another process.
There was a problem hiding this comment.
Very true, I am trying to find some way to remove this type of syntax from the test.
There was a problem hiding this comment.
This is still 0 for the second worker.
There was a problem hiding this comment.
Please let me know if I am correct to say that the first worker reassigns port1 to the bound port in this line, so the second worker is using that port, not zero.
There was a problem hiding this comment.
No, this is not correct, each worker has its own context.
There was a problem hiding this comment.
I understand, that is why I am having problems with the port assignments. Thank you
|
I was able to reduce the usage of common.PORT, is this better? |
|
I still think it's better to just move this test to |
|
I agree, there are a couple other tests that might be the same. |
The usage of common.PORT could cause undesired port collisions when run in parallel. The following test was moved to sequential. test-dgram-bind-shared-ports.js Ref: #12376
|
@arturgvieira I merged #12452 because
Hope you don't mind. |
|
I don't mind. |
* add `mustCall` and `mustNotCall` to all callbacks * added `known_issue` for port binding PR-URL: nodejs#13100 Refs: nodejs#13055 Refs: nodejs#12999 Refs: nodejs#13526 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* add `mustCall` and `mustNotCall` to all callbacks * added `known_issue` for port binding PR-URL: nodejs#13100 Refs: nodejs#13055 Refs: nodejs#12999 Refs: nodejs#13526 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
The usage of common.PORT could cause undesired port collisions when run
in parallel. The following test was moved to sequential.
test-dgram-bind-shared-ports.js
Ref: #12376
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
test