Skip to content

Commit c7b77c5

Browse files
alan-agius4clydin
authored andcommitted
test: move app-shell tests to flake jail
App-shell builder imports zone.js, which patches the global promises. In some cases this will causes flakiness in tests that run after this one. With this change we move the app-shell tests to the flake jail and force them to be run at the very last. Successful runs when disabling app-shell tests from test-large https://circleci.com/workflow-run/4afb40f2-19ec-46ab-bb94-4153d448e6ad (cherry picked from commit 7cb470f)
1 parent 91b1a2c commit c7b77c5

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.circleci/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ jobs:
252252
- run: yarn webdriver-update
253253
- run: yarn test-large --full --flakey --ve
254254
- run: yarn test-large --full --flakey
255+
- run: yarn test-large --full --glob packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large_disabled.ts --ve
256+
- run: yarn test-large --full --glob packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large_disabled.ts
255257

256258
build-bazel:
257259
executor: action-executor

packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts renamed to packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large_disabled.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@
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+
// tslint:disable-next-line: no-global-tslint-disable
89
// tslint:disable:no-big-function
910
import { Architect } from '@angular-devkit/architect/src/architect';
1011
import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core';
1112
import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies
1213
import { createArchitect, host } from '../utils';
1314

15+
// This test is excluded by default and will need to be run explicitly.
16+
// This is because App-Shell builder uses zone.js which patched the global Promise
17+
// Currently there is no clean way to unload zone.js which causes tests that run after
18+
// this to be extremly flaky.
19+
20+
// To run this test use:
21+
// yarn test-large --full --glob packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large_disabled.ts
22+
1423
describe('AppShell Builder', () => {
1524
const target = { project: 'app', target: 'app-shell' };
1625
let architect: Architect;

0 commit comments

Comments
 (0)