mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-09 02:12:20 +01:00
IntervalCounter flaky web test (fix #129774)
This commit is contained in:
@@ -740,14 +740,15 @@ suite('Async', () => {
|
||||
});
|
||||
|
||||
test('IntervalCounter', async () => {
|
||||
const counter = new async.IntervalCounter(10);
|
||||
const counter = new async.IntervalCounter(1);
|
||||
assert.strictEqual(counter.increment(), 1);
|
||||
assert.strictEqual(counter.increment(), 2);
|
||||
assert.strictEqual(counter.increment(), 3);
|
||||
|
||||
const now = Date.now();
|
||||
await async.timeout(20);
|
||||
if (Date.now() - now < 11) {
|
||||
await async.timeout(5);
|
||||
const ellapsed = Date.now() - now;
|
||||
if (ellapsed < 1) {
|
||||
return; // Firefox in Playwright seems to have a flaky timeout implementation (https://github.com/microsoft/vscode/issues/114028)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user