Title: bug(testability): scheduling a task with setInterval causes angular to be seen as unstable indefinitely · Issue #8089 · angular/angular · GitHub
Open Graph Title: bug(testability): scheduling a task with setInterval causes angular to be seen as unstable indefinitely · Issue #8089 · angular/angular
X Title: bug(testability): scheduling a task with setInterval causes angular to be seen as unstable indefinitely · Issue #8089 · angular/angular
Description: When you use setInterval, zone.js will count that as a pending task, and then will not decrease the pending task count until the event is canceled. The result is that if you use setInterval, then zone.js will think itself unstable until ...
Open Graph Description: When you use setInterval, zone.js will count that as a pending task, and then will not decrease the pending task count until the event is canceled. The result is that if you use setInterval, then z...
X Description: When you use setInterval, zone.js will count that as a pending task, and then will not decrease the pending task count until the event is canceled. The result is that if you use setInterval, then z...
Opengraph URL: https://github.com/angular/angular/issues/8089
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(testability): scheduling a task with setInterval causes angular to be seen as unstable indefinitely","articleBody":"When you use `setInterval`, [`zone.js` will count that as a pending task](https://github.com/angular/zone.js/blob/f8d5dc73a3c24d0ba34703e8b7a31808df6bd082/lib/zone.ts#L728), and then [will not decrease the pending task count](https://github.com/angular/zone.js/blob/f8d5dc73a3c24d0ba34703e8b7a31808df6bd082/lib/zone.ts#L739) until [the event is canceled](https://github.com/angular/zone.js/blob/f8d5dc73a3c24d0ba34703e8b7a31808df6bd082/lib/zone.ts#L756). The result is that if you use `setInterval`, then `zone.js` will think itself unstable until the interval is cleared. This is a reasonable design choice, but the problem is that we then [wait on `zone.js` to be stable in the testability API](https://github.com/angular/angular/blob/60727c4d2ba1e4b0b9455c767d0ef152bcedc7c2/modules/angular2/src/core/testability/testability.ts#L19). So if an app uses `setInterval` without the intention ever clearing the interval, the app will forever be seen as unstable by the testability API. This is clearly wrong, leading [some protractor tests to hang](https://github.com/angular/protractor/pull/3127). I propose that the testability API wait only on non-periodic tasks.\n","author":{"url":"https://github.com/sjelin","@type":"Person","name":"sjelin"},"datePublished":"2016-04-15T13:39:24Z","url":"https://github.com/angular/angular/issues/8089"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:41ff07ab-70a5-c5cd-6d60-d1781a3f84c0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CEA:27E5CD:E5B95E:128E3E2:6B00FAD2 |
| html-safe-nonce | c4fad1c1f15088a58828f68dbcba3d6c6b8ad39f37c147ae2e888feb6f567712 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0VBOjI3RTVDRDpFNUI5NUU6MTI4RTNFMjo2QjAwRkFEMiIsInZpc2l0b3JfaWQiOiIzODkzODU1NTE3NDI4MjE4NTc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1eefcafbda73319ffe2cf78e2c5e8acd21d0d83aae5feae4b12775d1a67a3fac |
| hovercard-subject-tag | issue:148663588 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/8089/issue_layout |
| twitter:image | https://opengraph.githubassets.com/64dbea5c64bde259057462d73b2aaf1bfcde52cacba4046050ac3bf8908eaafe/angular/angular/issues/8089 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/64dbea5c64bde259057462d73b2aaf1bfcde52cacba4046050ac3bf8908eaafe/angular/angular/issues/8089 |
| og:image:alt | When you use setInterval, zone.js will count that as a pending task, and then will not decrease the pending task count until the event is canceled. The result is that if you use setInterval, then z... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sjelin |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width