-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception not thrown when maximum call stack is exceeded #5370
Comments
Observables should always be assumed asynchronous in tests, because we have to handle our errors as such. Anytime someone does a The ONLY source of truth for observable errors should be the error handler in subscriptions. The fix for the max call stack error here might be to catch at the subscription point. These sorts of things are weird to defend against. Also of note: infinitely retrying or repeating a synchronous observable is probably a bad idea. |
Yeah... @cartant, it looks like we're not catching errors that happen during subscription when subscribing to observables that were created via lift. Other observables are using |
Looking into this, I think this is going to add a bit of weight to an already bloated hot-path. As it stands, we have a lot of logic around error handling during subscription that is just there for legacy reasons to keep us from breaking our partners at Google. (see |
I think with this one, what we want to do is probably add some tests that we skip for now, but have resolved by version 8, when we do a more comprehensive refactor of the library. |
* test(Observable): add skipped test for edge case related #5370 * chore: fix lint
- Uncomments a skipped test that was fixed with the v7 refactor (apparently just via better architecture) - Adds an additional test to simplify the same assertion - Adds a comment above a skipped section of tests explaining that we can probably remove them in v8 after we've moved completely to newer multicasting paradigms and removed deprecated operators. Resolves ReactiveX#5370
* chore: Stop skipping valid test Resolves #5105 * chore: Add comment about why this test is skipped. * chore: Correct skipped tests - Some of the skipped tests were clearly copied from retryWhen but never updated appropriately. - One of the skipped tests showed a buggy behavior that is now reported in an issue and a comment with a link to that issue is now above it. * chore: Update skipped tests - Uncomments a skipped test that was fixed with the v7 refactor (apparently just via better architecture) - Adds an additional test to simplify the same assertion - Adds a comment above a skipped section of tests explaining that we can probably remove them in v8 after we've moved completely to newer multicasting paradigms and removed deprecated operators. Resolves #5370 * chore: Stops skipping a fixed test. * chore: Add commented out bit to help find skipped tests Figuring out what tests are skipped out of 3,000+ tests is pretty annoying. I want to leave this here as a sign post to help.
Bug Report
Current Behavior
When subscribing to a stream that emits errors indefinitely and returning the original source when catching said error, eventually the maximum call stack is exceeded. I expect an exception to be thrown in this case, but it is currently swallowed and printed to the console.
Reproduction
Expected behavior
I would like the exception to be thrown and for this test to fail.
Environment
Additional context/Screenshots
I see in #3803 that the warn was added instead because throwing new errors would have been a breaking change. Could this be considered for 7.x?
The text was updated successfully, but these errors were encountered: