Skip to content

Commit 0b6a84a

Browse files
addaleaxtargos
authored andcommitted
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: #28829 PR-URL: #28884 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Сковорода Никита Андреевич <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent a7ef102 commit 0b6a84a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)