Skip to content
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

OperationConcatTest.testNestedAsyncConcat failed #581

Closed
akarnokd opened this issue Dec 8, 2013 · 1 comment
Closed

OperationConcatTest.testNestedAsyncConcat failed #581

akarnokd opened this issue Dec 8, 2013 · 1 comment
Assignees

Comments

@akarnokd
Copy link
Member

akarnokd commented Dec 8, 2013

While working on a fix for #577 I've run into a test failure (happened randomly):

org.mockito.exceptions.verification.VerificationInOrderFailure: 
Verification in order failure
Wanted but not invoked:
observer.onCompleted();
-> at rx.operators.OperationConcatTest.testNestedAsyncConcat(OperationConcatTest.java:259)
Wanted anywhere AFTER following interaction:
observer.onNext("nine");
-> at rx.operators.SafeObserver.onNext(SafeObserver.java:121)

    at rx.operators.OperationConcatTest.testNestedAsyncConcat(OperationConcatTest.java:259)

It appears the observer.onCompleted() in L195 races with the test inOrder.verify(observer, times(1)).onCompleted(); on L259. Adding a latch after L195 and before L259 seems to be a way to fix this, but I'm not sure of whether this is rather an issue with concat (I see plenty of questionable things in there too).

Thoughts?

@akarnokd
Copy link
Member Author

akarnokd commented May 6, 2014

Not happening a long ago so closing.

@akarnokd akarnokd closed this as completed May 6, 2014
jihoonson pushed a commit to jihoonson/RxJava that referenced this issue Mar 6, 2020
…er are ca… (ReactiveX#594)

* Issue ReactiveX#581: Some RxJava2 or Reactor operators like ZipObserver are cancelling (disposing) a second Observable when the first observable is complete. This is because an operator like zip must combine two events. It makes no sense to consume further events of the second observable when the first is completed. Unfortunately the cancellation is bad for the CircuitBreakerOperator, since no success is recorded even if an emit was emitted successfully. Solution: The CircuitBreaker operator and BulkHead operator could track if an event has been emitted successfully (onNext). And when dispose/cancel is invoked, the operator either invokes onSuccess/onComplete or releasePermission.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants