Skip to content
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

Closed
wants to merge 1 commit into from
Closed

inspector: Fix failing test #8019

wants to merge 1 commit into from

Conversation

eugeneo
Copy link
Contributor

@eugeneo eugeneo commented Aug 8, 2016

Checklist
  • make -j4 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected 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

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 8, 2016
@@ -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)));
Copy link
Member

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

Copy link
Contributor Author

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.

@addaleax addaleax added the inspector Issues and PRs related to the V8 inspector protocol label Aug 8, 2016
@ofrobots
Copy link
Contributor

ofrobots commented Aug 8, 2016

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.

@eugeneo
Copy link
Contributor Author

eugeneo commented Aug 9, 2016

Thank you for the review. I updated the commit message.

@bnoordhuis
Copy link
Member

LGTM but can you update the commit log status line to e.g. test: fix failing inspector cctest?

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
@eugeneo
Copy link
Contributor Author

eugeneo commented Aug 9, 2016

@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.

ofrobots pushed a commit that referenced this pull request Aug 10, 2016
Test was updated to wait till the inspector processes socket closure.

Fixes: #8006
PR-URL: #8019
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@ofrobots
Copy link
Contributor

Landed as 49e473a.

@ofrobots ofrobots closed this Aug 10, 2016
@cjihrig cjihrig mentioned this pull request Aug 10, 2016
cjihrig pushed a commit that referenced this pull request Aug 10, 2016
Test was updated to wait till the inspector processes socket closure.

Fixes: #8006
PR-URL: #8019
Reviewed-By: ofrobots - Ali Ijaz Sheikh <ofrobots@google.com>
Reviewed-By: bnoordhuis - Ben Noordhuis <info@bnoordhuis.nl>
@cjihrig cjihrig mentioned this pull request Aug 11, 2016
@eugeneo eugeneo deleted the failing_test branch August 16, 2016 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inspector Issues and PRs related to the V8 inspector protocol test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants