Skip to content

Commit 0fd8ce1

Browse files
committed
test: add verbose to identify the flaky cases
1 parent ee46d22 commit 0fd8ce1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/parallel/test-performance-measure.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ const ALLOWED_MARGIN = 10;
1010
const expected = ['Start to Now', 'A to Now', 'A to B'];
1111
const obs = new PerformanceObserver(common.mustCall((items) => {
1212
items.getEntries().forEach(({ name, duration }) => {
13-
assert.ok(duration > (DELAY - ALLOWED_MARGIN));
13+
// TODO(mrjithil) try catch is to fix the flaky error
14+
try {
15+
assert.ok(duration < (DELAY - ALLOWED_MARGIN));
16+
}
17+
catch (err) {
18+
console.log('test/parallel/test-performance-measure.js is flaky');
19+
console.log(`${DELAY} | ${ALLOWED_MARGIN} | ${duration}`);
20+
throw err;
21+
}
1422
assert.strictEqual(expected.shift(), name);
1523
});
1624
}));

0 commit comments

Comments
 (0)