-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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
inspector: Fix failing test #8019
Conversation
@@ -298,7 +298,7 @@ static void really_close(uv_handle_t* handle) { | |||
// Called when the test leaves inspector socket in active state | |||
static void manual_inspector_socket_cleanup() { | |||
EXPECT_EQ(0, uv_is_active( | |||
reinterpret_cast<uv_handle_t*>(&inspector.client))); | |||
reinterpret_cast<uv_handle_t*>(&inspector.client))); |
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.
This looked okay to me? reinterpret_cast<…>()
is an argument to uv_is_active
, not EXPECT_EQ
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.
Right. I reverted the change.
nit: since this is fixing a test, the commit message should probably use the 'test: ' prefix. Otherwise LGTM. CI: https://ci.nodejs.org/job/node-test-pull-request/3582/. I have verified locally that this fixes #8006. /cc @bnoordhuis as well. |
Thank you for the review. I updated the commit message. |
LGTM but can you update the commit log status line to e.g. I admit I don't understand why the test passes for me locally with and without this change. |
Test was updated to wait till the inspector processes socket closure. Fixes: #8006
@bnoordhuis I updated the message. This test failure was intermittent - it looks like sockets closing on Mac is somehow more "async" then on other systems (or simply slower) so this test failed because the cleanup code saw inspector socket as still open. If I added a delay (e.g. printed a message to stderr) the test succeeded. |
Landed as 49e473a. |
Checklist
make -j4 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
This change only touches inspector test.
Description of change
Test was updated to wait till the inspector processes socket closure.
CC: @ofrobots