Skip to content

Commit f4e819a

Browse files
committed
test: try to reduce flakes by added a timeout because e2e tests
This is an effort to try to reduce the flakeness of some tests that run Protractor multiple times
1 parent b10d2a7 commit f4e819a

File tree

7 files changed

+12
-26
lines changed

7 files changed

+12
-26
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { silentNg } from '../../utils/process';
23
import { expectToFail } from '../../utils/utils';
34

@@ -6,5 +7,6 @@ export default async function () {
67

78
// These should work.
89
await silentNg('e2e', 'test-project');
10+
await setTimeout(500);
911
await silentNg('e2e', 'test-project', '--dev-server-target=test-project:serve');
1012
}

tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
8+
import { setTimeout } from 'node:timers/promises';
99
import { replaceInFile, writeFile } from '../../utils/fs';
1010
import { ng } from '../../utils/process';
1111
import { updateJsonFile } from '../../utils/project';
@@ -54,5 +54,6 @@ export default async function () {
5454
});
5555

5656
await ng('e2e');
57+
await setTimeout(500);
5758
await ng('e2e', '--configuration=production');
5859
}

tests/legacy-cli/e2e/tests/build/library/lib-consumption-full-aot.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { ng } from '../../../utils/process';
23
import { libraryConsumptionSetup } from './setup';
34

@@ -9,5 +10,6 @@ export default async function () {
910

1011
// Check that the e2e succeeds prod and non prod mode
1112
await ng('e2e', '--configuration=production');
13+
await setTimeout(500);
1214
await ng('e2e', '--configuration=development');
1315
}

tests/legacy-cli/e2e/tests/build/library/lib-consumption-full-jit.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { updateJsonFile } from '../../../utils/project';
23
import { expectFileToMatch } from '../../../utils/fs';
34
import { ng } from '../../../utils/process';
@@ -21,6 +22,7 @@ export default async function () {
2122

2223
// Check that the e2e succeeds prod and non prod mode
2324
await ng('e2e', '--configuration=production');
25+
await setTimeout(500);
2426
await ng('e2e', '--configuration=development');
2527

2628
// Validate that sourcemaps for the library exists.

tests/legacy-cli/e2e/tests/build/library/lib-consumption-partial-aot.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { ng } from '../../../utils/process';
23
import { libraryConsumptionSetup } from './setup';
34

@@ -9,5 +10,6 @@ export default async function () {
910

1011
// Check that the e2e succeeds prod and non prod mode
1112
await ng('e2e', '--configuration=production');
13+
await setTimeout(500);
1214
await ng('e2e', '--configuration=development');
1315
}

tests/legacy-cli/e2e/tests/build/library/lib-consumption-partial-jit.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { setTimeout } from 'node:timers/promises';
12
import { updateJsonFile } from '../../../utils/project';
23
import { ng } from '../../../utils/process';
34
import { libraryConsumptionSetup } from './setup';
@@ -20,5 +21,6 @@ export default async function () {
2021

2122
// Check that the e2e succeeds prod and non prod mode
2223
await ng('e2e', '--configuration=production');
24+
await setTimeout(500);
2325
await ng('e2e', '--configuration=development');
2426
}

tests/legacy-cli/e2e/tests/build/rebuild-types.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)