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: make parallel/test-bootstrap-modules easier to reason about #23884

Closed
refack opened this issue Oct 25, 2018 · 3 comments · Fixed by #26531
Closed

test: make parallel/test-bootstrap-modules easier to reason about #23884

refack opened this issue Oct 25, 2018 · 3 comments · Fixed by #26531
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests.

Comments

@refack
Copy link
Contributor

refack commented Oct 25, 2018

  • Version: N/A
  • Platform: All
  • Subsystem: test,bootstrap

/* eslint-disable node-core/required-modules */
'use strict';
// Ordinarily test files must require('common') but that action causes
// the global console to be compiled, defeating the purpose of this test.
// This makes sure no additional files are added without carefully considering
// lazy loading. Please adjust the value if necessary.
const list = process.moduleLoadList.slice();
const assert = require('assert');
assert(list.length <= 78, list);

The test uses a magic number that can only be reasonably found empeericaly. That number also changes depending on what CLI parameters are used, or if run with a test harness.
Some suggestions for improvement have been:

  1. blacklist some modules that we know we don’t want to have loaded unconditionally, rather than set a fixed number. (@addaleax)
  2. Just reports from the CI or add something informative to the test runner output. (@devsnek)
  3. ???

Refs: #23876

@refack refack added good first issue Issues that are suitable for first-time contributors. test Issues and PRs related to the tests. flaky-test Issues and PRs related to the tests with unstable failures on the CI. process Issues and PRs related to the process subsystem. labels Oct 25, 2018
@devsnek
Copy link
Member

devsnek commented Oct 25, 2018

fwiw my suggestion is now a whitelist of modules

@ho-dor
Copy link

ho-dor commented Nov 8, 2018

Can I work on this as this has a good first issue tag? @refack

@Trott Trott removed good first issue Issues that are suitable for first-time contributors. mentor-available labels Nov 10, 2018
@Trott
Copy link
Member

Trott commented Nov 20, 2018

I kind of wonder if the test should be removed.

richardlau added a commit to richardlau/node-1 that referenced this issue Mar 13, 2019
Be explicit on the modules that are expected to be loaded and add an
appropriate assertion failure message to help debug when the list
changes.

Fixes: nodejs#23884

PR-URL: nodejs#26531
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
targos pushed a commit to targos/node that referenced this issue Mar 27, 2019
Be explicit on the modules that are expected to be loaded and add an
appropriate assertion failure message to help debug when the list
changes.

Fixes: nodejs#23884

PR-URL: nodejs#26531
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
targos pushed a commit that referenced this issue Mar 27, 2019
Be explicit on the modules that are expected to be loaded and add an
appropriate assertion failure message to help debug when the list
changes.

Fixes: #23884

PR-URL: #26531
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. process Issues and PRs related to the process subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants