-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
test: refactor switch #4870
test: refactor switch #4870
Conversation
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: nodejs#4870
1d6e3c6
to
67d8d98
Compare
OK, updated to just remove confusing unused object from function calls. |
One buildbot failure but otherwise looks good. /cc @nodejs/testing (looking for an LGTM or two) |
LGTM |
LGTM Shouldn't send check the type of callback right away? |
@orangemocha You'd think so, but it doesn't. Not sure if that's a feature or a bug. Here's the current relevant code from
So, if the But if it is connected, then it passes
It will call the callback on success if the callback is a function, but ignore it otherwise. Again, not sure if this is a bug or a feature (or me misunderstanding how the code works--always a possibility). |
@orangemocha I should add that if |
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: nodejs#4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
Landed in 0351b2f |
Added the lts-watch-v4.x label. |
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: #4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: #4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
@Trott this commit is breaking the unit test suite on Would you be open to backporting this and opening a new PR so we can test and what not |
@thealphanerd Odd. This change should be a no-op. When you say "unit test suite", what is that? |
never mind.. there is a new flaky test on 4.x... I'll land this now |
Here's the error we are getting now |
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: #4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
@thealphanerd I've not seen that before. (It's almost definitely unrelated to this PR.) Is that OS X? Are you running |
happening locally on osx when running make-test. Once I have this RC ready to cut I'm going to stress test that one |
I'm pretty sure I've seen that one on OS X too |
Oh, I sent a PR some time ago for this: #4970 |
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: #4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: #4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
`test-child-process-fork-net2.js` has a switch statement with 6 cases. Each case uses `child.send()`, passing an object for the callback. `child.send()` ignores the callback because it is not a function. Removing the unused argument. PR-URL: nodejs#4870 Reviewed-By: Alexis Campailla <orangemocha@nodejs.org>
test-child-process-fork-net2.js
has a switch statement with 6 cases.Each case uses
child.send()
, passing an object for the callback.child.send()
ignores the callback because it is not a function.Removing the unused argument.