Increase parallel test time tolerance (#7372)

This commit is contained in:
Bjorn Lu 2023-06-12 21:51:20 +08:00 committed by GitHub
parent 718cebd526
commit 807f46791d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,15 +21,15 @@ describe('Component parallelization', () => {
Number(element.children[0].data) Number(element.children[0].data)
); );
let renderStartWithin = Math.max(...startTimes) - Math.min(...startTimes); const renderStartWithin = Math.max(...startTimes) - Math.min(...startTimes);
expect(renderStartWithin).to.be.lessThan( expect(renderStartWithin).to.be.lessThan(
10, // in theory, this should be 0, so 10ms tolerance 40, // in theory, this should be 0, but add 40ms tolerance for CI
"The components didn't start rendering in parallel" "The components didn't start rendering in parallel"
); );
const totalRenderTime = Math.max(...finishTimes) - Math.min(...startTimes); const totalRenderTime = Math.max(...finishTimes) - Math.min(...startTimes);
expect(totalRenderTime).to.be.lessThan( expect(totalRenderTime).to.be.lessThan(
60, // max component delay is 40ms 80, // max component delay is 40ms, add 40ms tolerance for CI
'The total render time was significantly longer than the max component delay' 'The total render time was significantly longer than the max component delay'
); );
}); });