You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
test/simple/test-child-process-fork-dgram.js is broken on SmartOS #8046
Actually, it seems we're just lucky that it works on any platform. It's possible that either only the child or the master will handle UDP messages. That what happens on SmartOS. PR #8045 fixes the issue currently, but it's some band-aid on a test waiting to break.
I'll rephrase what I included in the PR's description:
What are we trying to test with this test case? Do we absolutely need both the child and the parent to always handle UDP messages? Could we remove the UDP 'message' event handler as soon as we receive one dgram in the child or the master, so that the one that did not receive a message yet will be the only one that can receive it? This would guarantee (well, as much as UDP can guarantee anything...) that both processes will receive at least one message.
I think the right solution here is not to rely on a number of messages, since it's clear that the parent or child may be what gets the message. Instead let the test run until the child receives at least one message and then inform the parent to shutdown.
This means that when debugging this test individually it will appear to hang (in the case that things have gone wrong) but when run within the test suite the test runner will kill it after its timeout is hit (generally 60 seconds)
Activity
tjfontaine commentedon Aug 6, 2014
I think the right solution here is not to rely on a number of messages, since it's clear that the parent or child may be what gets the message. Instead let the test run until the child receives at least one message and then inform the parent to shutdown.
This means that when debugging this test individually it will appear to hang (in the case that things have gone wrong) but when run within the test suite the test runner will kill it after its timeout is hit (generally 60 seconds)
tests: fix child-process-fork-dgram on SmartOS.
misterdjules commentedon Aug 6, 2014
@tjfontaine PR #8045 ready for review.
tests: fix child-process-fork-dgram on SmartOS.
tests: fix child-process-fork-dgram on SmartOS.