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

test: edited assertion and timeout for test #9889

Closed
wants to merge 2 commits into from

Conversation

danielgsims
Copy link

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

test

Description of change

In this change, the setTimeout needed a second argument, so I set that
value to 0. In addition, I changed the assertion to be a strictEquals
instead of equals.

In this change, the setTimeout needed a second argument, so I set that
value to 0. In addition, I changed the assertion to be a strictEquals
instead of equals.
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Dec 1, 2016
@mscdex mscdex added the domain Issues and PRs related to the domain subsystem. label Dec 1, 2016
@danielgsims
Copy link
Author

This was from the Code & Learn at NINA.

});
});
});
}, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this should be a timer for the purposes of this test, even though it is effectively a setImmediate().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably also be a duration of 1. Duration of 0 gets changed to 1 internally anyways.

@imyller imyller added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Dec 1, 2016
@Trott
Copy link
Member

Trott commented Dec 1, 2016

Copy link
Member

@lpinca lpinca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that you are at it can you also please change var occurences to const and setTimeout to setImmediate as suggested by @cjihrig?

Thanks.

@Trott
Copy link
Member

Trott commented Dec 5, 2016

@lpinca IAre you sure about the setTimeout() -> setImmediate() suggestion? It seems to me that the test may be specifically checking for the correct interaction between setTimeout() and domains. setImmediate() should perhaps be a different test if it is required.

@lpinca
Copy link
Member

lpinca commented Dec 5, 2016

@Trott no, I'm not honestly not sure. Happy to keep setTimeout() but would be nice to change var to const if possible.

I changed the var declarations to const in this unit test
@danielgsims
Copy link
Author

Changed var declarations. Let me know if there's anything else.

@lpinca
Copy link
Member

lpinca commented Dec 6, 2016

@danielgsims Thanks!

@jasnell
Copy link
Member

jasnell commented Dec 7, 2016

@Trott
Copy link
Member

Trott commented Dec 7, 2016

Landing. While landing, I'll change the 0 to a 1 per @Fishrock123's (and my) preference.

Trott pushed a commit to Trott/io.js that referenced this pull request Dec 7, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: nodejs#9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@Trott
Copy link
Member

Trott commented Dec 7, 2016

Landed in b0c10a2.
Thanks for the contribution! 🎉

@Trott Trott closed this Dec 7, 2016
addaleax pushed a commit that referenced this pull request Dec 8, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: #9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
addaleax pushed a commit to addaleax/node that referenced this pull request Dec 8, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: nodejs#9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
@italoacasas italoacasas mentioned this pull request Dec 15, 2016
MylesBorins pushed a commit that referenced this pull request Dec 20, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: #9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: #9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
MylesBorins pushed a commit that referenced this pull request Dec 21, 2016
In this change, the setTimeout needed a second argument, so I set that
value to 1. In addition, I changed the assertion to be a strictEquals
instead of equals.

I changed the var declarations to const in this test.

PR-URL: #9889
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
This was referenced Dec 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. domain Issues and PRs related to the domain subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.