Skip to content

Commit 054af80

Browse files
committed
test: update rebuild debounce times to reduce flakiness
1 parent c821985 commit 054af80

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

packages/angular_devkit/build_angular/src/browser/specs/rebuild_spec.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// tslint:disable:no-big-function
99
import { Architect } from '@angular-devkit/architect';
1010
import { TestLogger } from '@angular-devkit/architect/testing';
11-
import { join, logging, normalize, virtualFs } from '@angular-devkit/core';
11+
import { join, normalize, virtualFs } from '@angular-devkit/core';
1212
import { debounceTime, take, takeWhile, tap } from 'rxjs/operators';
1313
import {
1414
createArchitect,
@@ -23,7 +23,7 @@ describe('Browser Builder rebuilds', () => {
2323
const target = { project: 'app', target: 'build' };
2424
// Rebuild tests are especially sensitive to time between writes due to file watcher
2525
// behaviour. Give them a while.
26-
const rebuildDebounceTime = 3000;
26+
const rebuildDebounceTime = 6000;
2727
let architect: Architect;
2828

2929
beforeEach(async () => {
@@ -593,7 +593,7 @@ describe('Browser Builder rebuilds', () => {
593593
let buildCount = 1;
594594
const run = await architect.scheduleTarget(target, overrides);
595595
await run.output.pipe(
596-
debounceTime(rebuildDebounceTime),
596+
debounceTime(rebuildDebounceTime + 1000),
597597
tap(() => {
598598
const content = virtualFs.fileBufferToString(
599599
host.scopedSync().read(join(outputPath, 'main.js')),

packages/angular_devkit/build_angular/src/browser/specs/unused-files-warning_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ describe('Browser Builder unused files warnings', () => {
178178

179179
await run.output
180180
.pipe(
181-
debounceTime(1000),
181+
debounceTime(6000),
182182
tap(buildEvent => {
183183
expect(buildEvent.success).toBe(true);
184184

packages/angular_devkit/build_angular/src/browser/specs/web-worker_spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('Browser Builder Web Worker support', () => {
147147
const { run } = await timer(1000).pipe(
148148
switchMap(() => architect.scheduleTarget(target, overrides)),
149149
switchMap(run => run.output.pipe(map(output => ({ run, output })))),
150-
debounceTime(500),
150+
debounceTime(4000),
151151
tap(({ output }) => expect(output.success).toBe(true, 'build should succeed')),
152152
tap(() => {
153153
switch (phase) {

0 commit comments

Comments
 (0)