Skip to content

Commit 98c46a0

Browse files
committed
test(@angular/cli): delay changes to reduce tests/legacy-cli/e2e/tests/basic/rebuild.ts flakiness
It appears that the changes where being done to quicky to be picked up by the watcher. (cherry picked from commit 31d17e0)
1 parent f4b6380 commit 98c46a0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/legacy-cli/e2e/tests/basic/rebuild.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { getGlobalVariable } from '../../utils/env';
23
import { appendToFile, replaceInFile, writeMultipleFiles } from '../../utils/fs';
34
import { silentNg, waitForAnyProcessOutputToMatch } from '../../utils/process';
@@ -27,6 +28,7 @@ export default async function () {
2728
]);
2829

2930
// Change multiple files and check that all of them are invalidated and recompiled.
31+
await setTimeout(500);
3032
await Promise.all([
3133
waitForAnyProcessOutputToMatch(validBundleRegEx),
3234
appendToFile(
@@ -46,6 +48,7 @@ export default async function () {
4648
),
4749
]);
4850

51+
await setTimeout(500);
4952
await Promise.all([
5053
waitForAnyProcessOutputToMatch(validBundleRegEx),
5154
writeMultipleFiles({
@@ -74,6 +77,7 @@ export default async function () {
7477
}
7578
}
7679

80+
await setTimeout(500);
7781
await Promise.all([
7882
waitForAnyProcessOutputToMatch(validBundleRegEx),
7983
writeMultipleFiles({
@@ -89,6 +93,7 @@ export default async function () {
8993
}
9094
}
9195

96+
await setTimeout(500);
9297
await Promise.all([
9398
waitForAnyProcessOutputToMatch(validBundleRegEx),
9499
writeMultipleFiles({
@@ -104,6 +109,7 @@ export default async function () {
104109
}
105110
}
106111

112+
await setTimeout(500);
107113
await Promise.all([
108114
waitForAnyProcessOutputToMatch(validBundleRegEx),
109115
writeMultipleFiles({

0 commit comments

Comments
 (0)