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/report/test-report-fatal-error.js fails because of bogus expectation #28886

Closed
hashseed opened this issue Jul 29, 2019 · 1 comment
Closed
Assignees
Labels
report Issues and PRs related to process.report. test Issues and PRs related to the tests.

Comments

@hashseed
Copy link
Member

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(cpus.some((c) => {
    console.log(c.speed, cpu.speed)
    return c.model === cpu.model && c.speed === cpu.speed;
  }))

    at /usr/local/google/home/yangguo/node/test/common/report.js:111:5
    at Array.forEach (<anonymous>)
    at _validateContent (/usr/local/google/home/yangguo/node/test/common/report.js:103:15)
    at validateContent (/usr/local/google/home/yangguo/node/test/common/report.js:40:5)
    at Object.validate (/usr/local/google/home/yangguo/node/test/common/report.js:27:3)
    at ChildProcess.<anonymous> (/usr/local/google/home/yangguo/node/test/report/test-report-fatal-error.js:36:12)
    at ChildProcess.<anonymous> (/usr/local/google/home/yangguo/node/test/common/index.js:371:15)
    at ChildProcess.emit (events.js:203:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)

The reason is simple: when the CPU governor is enabled, the clock speed is variable. The expected speed comes from require('os').cpus(), which may have a different speed than when the report was collected.

@hashseed hashseed self-assigned this Jul 29, 2019
@addaleax addaleax added report Issues and PRs related to process.report. test Issues and PRs related to the tests. labels Jul 29, 2019
@lpinca
Copy link
Member

lpinca commented Jul 29, 2019

Fixed by #28884, reopen if I am wrong.

@lpinca lpinca closed this as completed Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
report Issues and PRs related to process.report. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants