-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
test changing common.PORT to use 0 within the test-cluster-dgram.reus… #12932
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
Closed
Closed
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bf452e2
test changing common.PORT to use 0 within the test-cluster-dgram.reus…
akopcz2 55107dc
Removing for loop and creating a seperate socket within test-cluster-…
akopcz2 49ffe2d
Updating code structure to pass lint within test-cluster-dgram-reuse.js
akopcz2 0be4a6e
enabling es lint and refactoring socket function within test-cluster-…
akopcz2 7db0f60
enabling es lint and refactoring socket function within test-cluster-…
akopcz2 e4f250a
creating second socket to pass to next function to test multiple sock…
akopcz2 41292b7
updating socket2 to be equal to dgram.createSocket function not socke…
akopcz2 35b3d29
Merge branch 'master' into test-cluster-dgram-reuse.js
akopcz2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,5 +36,9 @@ function close() { | |
| cluster.worker.disconnect(); | ||
| } | ||
|
|
||
| for (let i = 0; i < 2; i++) | ||
| dgram.createSocket({ type: 'udp4', reuseAddr: true }).bind(common.PORT, next); | ||
| const socket = dgram.createSocket({type: 'udp4', reuseAddr: true}) | ||
| .bind(0, common.mustCall(() => { | ||
| const socket2 = dgram.createSocket({type: 'udp4', reuseAddr: true}) | ||
| socket.bind(this.address().port, next); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not so happy about this re |
||
| socket2.bind(this.address().port, next); | ||
| })); | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 runs bind twice on the
socketbut the existing test runscreateSocket()twice and this runs it only once. But running it twice is what is actually being tested here, I think. So this invalidates the test, I think.Uh oh!
There was an error while loading. Please reload this page.
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.
@Trott Thanks! That makes sense. Would calling another socket inside the callback here work e4f250a ?