Skip to content

Commit cb296b8

Browse files
alan-agius4mgechev
authored andcommitted
test: fix flakes of rebuilds TS worker
Not quite sure why such a long 'debounceTime' is needed anything under `2500` is a constant failure locally and this is also rather flaky on CI when it doesn't run as the first test. It seems that the outputted files contents don't get updated in time.
1 parent f90456c commit cb296b8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/angular_devkit/build_angular/test/browser/web-worker_spec_large.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -138,18 +138,20 @@ describe('Browser Builder Web Worker support', () => {
138138
watch: true,
139139
};
140140

141-
let buildCount = 0;
142141
let phase = 1;
143142
const workerPath = join(outputPath, '0.worker.js');
144143
let workerContent = '';
145144

146145
const run = await architect.scheduleTarget(target, overrides);
147146
await run.output.pipe(
148147
// Wait for files to be written to disk.
149-
debounceTime(1000),
148+
// FIXME: Not quite sure why such a long 'debounceTime' is needed.
149+
// Anything under `2500` is a constant failure locally when using
150+
// 'fdescribe' and this tests doesn't run as first one and is also rather flaky on CI.
151+
// It seems that the outputted files contents don't get updated in time.
152+
debounceTime(2500),
150153
tap((buildEvent) => expect(buildEvent.success).toBe(true, 'build should succeed')),
151154
tap(() => {
152-
buildCount++;
153155
switch (phase) {
154156
case 1:
155157
// Original worker content should be there.

0 commit comments

Comments
 (0)