Skip to content

test: removed unnecessary Buffer import - #13860

Closed
swinston1000 wants to merge 5 commits into
nodejs:masterfrom
swinston1000:buffer
Closed

test: removed unnecessary Buffer import#13860
swinston1000 wants to merge 5 commits into
nodejs:masterfrom
swinston1000:buffer

Conversation

@swinston1000

@swinston1000swinston1000 commented Jun 21, 2017

Copy link
Copy Markdown
Contributor

no need to require('buffer') in test files, so removed from:

  • test\disabled\test-sendfd.js
  • test\internet\test-dgram-broadcast-multi-process.js
  • test\pummel\test-https-no-reader.js

first ever contribution :-)
thanks to #goodnessSquad for the support and vision!

Refs: #13836

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows [commit guidelines]
Affected core subsystem(s)

test

@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Jun 21, 2017

@refackrefack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good, just a few nits

Comment threadtest/disabled/test-sendfd.js Outdated
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// The above copnotice and this permission notice shall be included

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unintentional?
(beware of over eager IDEs. If you're using WebStorm, enable ESlint with our .eslint.yaml)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yes completely, do you want me to close and fix all of this?

Comment threadtest/disabled/test-sendfd.js Outdated
var SOCK_PATH = path.join(__dirname,
'..',
path.basename(__filename, '.js') + '.sock');
'..',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So we either chop (put every arg in it's own line)
Or align to call ( (as it was).

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

fixed :-)

Comment threadtest/disabled/test-sendfd.js Outdated
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// The above copnotice and this permission notice shall be included

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you please revert this change?

Comment threadtest/disabled/test-sendfd.js Outdated
var DATA = {
'ppid': process.pid,
'ord': 0
'ppid': process.pid,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This change is unrelated. You may do it in this PR if you want, but you need to reframe the commit message and the PR title differently then.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggestion: Something like:

test: removed unnecessary require and style fix

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Reverted the change so won't change title
Thanks for pointing it out
Lesson learned not to have auto-beautify when working on open-source projects :-)

Comment threadtest/disabled/test-sendfd.js Outdated
var SOCK_PATH = path.join(__dirname,
'..',
path.basename(__filename, '.js') + '.sock');
'..',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated style change.

Comment threadtest/disabled/test-sendfd.js Outdated
var cp = child_process.spawn(process.argv[0],
[path.join(common.fixturesDir, 'recvfd.js'),
SOCK_PATH]);
var cp = child_process.spawn(process.argv[0], [path.join(common.fixturesDir, 'recvfd.js'),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unrelated style change. Besides that, it will fail linting. Please don't ignore the friendly reminder to run make -j4 test you can see in the pull request template :)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I did, and it failed first time
I changed, it passed
Not sure how this happened
Fixing now, sorry :-)

@swinston1000swinston1000 left a comment

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Sorry, my first ever contribution and didn't fully appreciate the style guide and the fact my IDE had made so many changes. All should be OK now. Thanks for your patience.

Comment threadtest/disabled/test-sendfd.js Outdated
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// The above copnotice and this permission notice shall be included

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

yes completely, do you want me to close and fix all of this?

Comment threadtest/disabled/test-sendfd.js Outdated
var cp = child_process.spawn(process.argv[0],
[path.join(common.fixturesDir, 'recvfd.js'),
SOCK_PATH]);
var cp = child_process.spawn(process.argv[0], [path.join(common.fixturesDir, 'recvfd.js'),

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I did, and it failed first time
I changed, it passed
Not sure how this happened
Fixing now, sorry :-)

@aqrlnaqrln left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@aqrln

Copy link
Copy Markdown
Contributor

Comment threadtest/disabled/test-sendfd.js Outdated
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// The above copnotice and this permission notice shall be included

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks like an accident :)

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

'twas, now reverted

Comment threadtest/disabled/test-sendfd.js Outdated
var DATA = {
'ppid': process.pid,
'ord': 0
'ppid': process.pid,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the formatting changes?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

@benjamingr

Auto beautifier - and the tests didn't pick it up.
I reverted all changes - should all be good now and know in future to turn that off or use your guide!

Sorry and thanks for this evening!

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

now reverted :-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@benjamingrbenjamingr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM and thanks :)

@refackrefack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🥇

@tniessentniessen self-assigned this Jun 22, 2017
tniessen pushed a commit that referenced this pull request Jun 23, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@tniessen

Copy link
Copy Markdown
Member

Landed in e42b1b1, thank you for your first contribution! 🎉

CI on master: https://ci.nodejs.org/job/node-test-commit/10749/

addaleax pushed a commit that referenced this pull request Jun 24, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@addaleaxaddaleax mentioned this pull request Jun 24, 2017
addaleax pushed a commit that referenced this pull request Jun 29, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
addaleax pushed a commit that referenced this pull request Jul 11, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
addaleax pushed a commit that referenced this pull request Jul 18, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 14, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 15, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
MylesBorins pushed a commit that referenced this pull request Aug 16, 2017
Removed require('buffer') from
- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js
PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Aug 16, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@swinston1000@aqrln@tniessen@refack@jasnell@benjamingr@TimothyGu@cjihrig@mhdawson@vsemozhetbyt@MylesBorins@nodejs-github-bot