Skip to content

Commit

Permalink
test: try to reduce flakes by added a timeout because e2e tests
Browse files Browse the repository at this point in the history
This is an effort to try to reduce the flakeness of some tests that run Protractor multiple times
  • Loading branch information
alan-agius4 committed Dec 4, 2023
1 parent b10d2a7 commit f4e819a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 26 deletions.
2 changes: 2 additions & 0 deletions tests/legacy-cli/e2e/tests/basic/e2e.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import { silentNg } from '../../utils/process';
import { expectToFail } from '../../utils/utils';

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

// These should work.
await silentNg('e2e', 'test-project');
await setTimeout(500);
await silentNg('e2e', 'test-project', '--dev-server-target=test-project:serve');
}
3 changes: 2 additions & 1 deletion tests/legacy-cli/e2e/tests/build/lazy-load-syntax.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import { setTimeout } from 'node:timers/promises';
import { replaceInFile, writeFile } from '../../utils/fs';
import { ng } from '../../utils/process';
import { updateJsonFile } from '../../utils/project';
Expand Down Expand Up @@ -54,5 +54,6 @@ export default async function () {
});

await ng('e2e');
await setTimeout(500);
await ng('e2e', '--configuration=production');
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import { ng } from '../../../utils/process';
import { libraryConsumptionSetup } from './setup';

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

// Check that the e2e succeeds prod and non prod mode
await ng('e2e', '--configuration=production');
await setTimeout(500);
await ng('e2e', '--configuration=development');
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import { updateJsonFile } from '../../../utils/project';
import { expectFileToMatch } from '../../../utils/fs';
import { ng } from '../../../utils/process';
Expand All @@ -21,6 +22,7 @@ export default async function () {

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

// Validate that sourcemaps for the library exists.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import { ng } from '../../../utils/process';
import { libraryConsumptionSetup } from './setup';

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

// Check that the e2e succeeds prod and non prod mode
await ng('e2e', '--configuration=production');
await setTimeout(500);
await ng('e2e', '--configuration=development');
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { setTimeout } from 'node:timers/promises';
import { updateJsonFile } from '../../../utils/project';
import { ng } from '../../../utils/process';
import { libraryConsumptionSetup } from './setup';
Expand All @@ -20,5 +21,6 @@ export default async function () {

// Check that the e2e succeeds prod and non prod mode
await ng('e2e', '--configuration=production');
await setTimeout(500);
await ng('e2e', '--configuration=development');
}
25 changes: 0 additions & 25 deletions tests/legacy-cli/e2e/tests/build/rebuild-types.ts

This file was deleted.

0 comments on commit f4e819a

Please sign in to comment.