Skip to content

Commit 496861b

Browse files
committed
test,report: relax CPU match requirements
Some CPUs have variable speeds, and so exact matches between what `os.cpus()` and the report feature yield cannot always be expected: ``` > const results = [] > setInterval(() => results.push(os.cpus().map(({ speed }) => speed)), 1) [...] > results [ [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 1198, 1150, 1195, 1149 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2401, 2420, 2429, 2413 ], [ 2596, 2401, 2699, 2555 ], [...] ``` Refs: nodejs#28829
1 parent 779a05d commit 496861b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/common/report.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function _validateContent(report) {
109109
assert.strictEqual(typeof cpu.idle, 'number');
110110
assert.strictEqual(typeof cpu.irq, 'number');
111111
assert(cpus.some((c) => {
112-
return c.model === cpu.model && c.speed === cpu.speed;
112+
return c.model === cpu.model;
113113
}));
114114
});
115115
assert.strictEqual(header.host, os.hostname());

0 commit comments

Comments
 (0)