angular-docs-cn/packages
George Kalpakas 3b7a571cc5 test(upgrade): clean up global state after test (#28181)
In ngUpgradeLite, when a downgraded component
[requests its downgraded module][1], the AngularJS injector is
[temporarily stored][2] with the intention of grabbing it
[once the module has been bootstrapped][3] (which also cleans up the
[temporary injector reference][4]).

In [some tests][5], bootstrapping a component might throw an error,
which causes the test to fail immediatelly and move on to the next
test. In slow browsers (e.g. on CI/Saucelabs), the (successful)
bootstrapping of another downgraded module might not have been
completed in time and thus the temporary injector reference not cleaned
up.

In such a case, if the following test (in our randomized test suite)
happens to rely on the temporary injector reference's being initially
unset (such as [this test][6]), it will fail. This might appear as a
flake on CI, because it depends on a race condition and specific order
of tests, so it usually goes away after a rerun.

This commit fixes it by ensuring the temporary injector reference is
manually cleaned up, when necessary.

Jira issue: FW-939

[1]: f983e99fb2/packages/upgrade/src/common/downgrade_component.ts (L120)
[2]: f983e99fb2/packages/upgrade/src/static/downgrade_module.ts (L165)
[3]: f983e99fb2/packages/upgrade/src/static/downgrade_module.ts (L169)
[4]: f983e99fb2/packages/upgrade/src/static/angular1_providers.ts (L25)
[5]: f983e99fb2/packages/upgrade/test/static/integration/downgrade_module_spec.ts (L1331-L1381)
[6]: f983e99fb2/packages/upgrade/test/static/angular1_providers_spec.ts (L31-L45)

PR Close #28181
2019-01-16 09:45:01 -08:00
..
animations refactor: remove redundant error in catch (#25478) 2019-01-04 15:42:19 -08:00
bazel fix(bazel): Bazel schematics should add router package (#28141) 2019-01-14 17:12:00 -08:00
benchpress build: remove "build.sh" script (#27937) 2019-01-07 15:35:09 -08:00
common docs: add api doc for switch directives (#27378) 2019-01-15 10:53:03 -08:00
compiler refactor(ivy): remove def.attributes in favor of the `elementHostAttrs` instruction (#28089) 2019-01-15 09:45:41 -08:00
compiler-cli fix(ivy): normalize summary and factory shim files paths (#28006) 2019-01-15 11:21:58 -08:00
core test(ivy): enable passing animation test (#28156) 2019-01-15 14:09:52 -08:00
docs
elements refactor: remove redundant error in catch (#25478) 2019-01-04 15:42:19 -08:00
examples docs: ngComponentOutlet doc updated with new Injector creation (#27291) 2019-01-14 10:36:02 -08:00
forms docs(forms): fix up `@see` tags for `AbstractContol` (#28069) 2019-01-11 14:35:23 -08:00
http refactor: remove redundant error in catch (#25478) 2019-01-04 15:42:19 -08:00
language-service refactor(language-service): Cleanup ts_plugin (#28145) 2019-01-15 11:30:37 -08:00
platform-browser feat(ivy): implement `compileComponents` method for `TestBedRender3` (#27778) 2019-01-15 14:08:20 -08:00
platform-browser-dynamic test(ivy): root causes update for 'platform-browser-dynamic' and i18n tests (#27972) 2019-01-07 20:27:50 -08:00
platform-server perf(platform-server): use shared `DomElementSchemaRegistry` instance (#28150) (#28151) 2019-01-15 11:27:54 -08:00
platform-webworker fix(ivy): disable test which rely on DebugElement in WebWorker (#27895) 2019-01-04 18:37:31 -08:00
platform-webworker-dynamic build: restrict visibility of npm_package targets (#27611) 2018-12-14 10:20:40 -08:00
private/testing ci: onlyInIvy tests should not be triggered for FIND_PASSING_TESTS mode (#28036) 2019-01-10 10:55:58 -08:00
router docs(router): add clarification for Router config (#28159) 2019-01-15 10:54:49 -08:00
service-worker fix(service-worker): navigation urls backwards compatibility (#27244) 2019-01-15 09:50:31 -08:00
upgrade test(upgrade): clean up global state after test (#28181) 2019-01-16 09:45:01 -08:00
BUILD.bazel build(bazel): use fine-grained npm deps (#26111) (#26488) 2018-10-19 20:59:29 -07:00
README.md Revert "docs: Remove unneeded file (#18106)" 2017-07-20 16:46:47 -05:00
empty.ts
es6-subset.d.ts build: fix our copy of Array#find typing (#27742) 2018-12-19 15:11:52 -05:00
goog.d.ts test(ivy): add bundling test `todo_i18n` (#27420) 2018-12-04 19:59:12 -08:00
license-banner.txt build: bump year (#27880) 2019-01-11 11:15:59 -08:00
rollup.config.js refactor: make all rollup config ES5 compatible (#20028) 2017-10-30 23:09:17 -04:00
system.d.ts
tsconfig-build.json build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00
tsconfig-test.json build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00
tsconfig.json fix(compiler): Fix look up of entryComponents in AOT Summaries (#24892) 2018-09-11 16:23:17 -07:00
types.d.ts build: refactor ambient node & jasmine types so they are only included where needed (#25491) 2018-08-16 13:46:43 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

License: MIT