Fix ReplaySubject Terminal State Race Condition#1150
Merged
benjchristensen merged 2 commits intoReactiveX:masterfrom May 5, 2014
Merged
Fix ReplaySubject Terminal State Race Condition#1150benjchristensen merged 2 commits intoReactiveX:masterfrom
benjchristensen merged 2 commits intoReactiveX:masterfrom
Conversation
Member
Author
|
Unit test to assert this is: @Test
public void testRaceForTerminalState() {
final List<Integer> expected = Arrays.asList(1);
for (int i = 0; i < 1000000; i++) {
TestSubscriber<Integer> ts = new TestSubscriber<Integer>();
Observable.just(1).subscribeOn(Schedulers.computation()).cache().subscribe(ts);
ts.awaitTerminalEvent();
ts.assertReceivedOnNext(expected);
ts.assertTerminalEvent();
}
}I am including that test with a smaller loop size. If this bug were to return that test should non-deterministically fail, even with the smaller loop. |
benjchristensen
added a commit
that referenced
this pull request
May 5, 2014
Fix ReplaySubject Terminal State Race Condition
|
RxJava-pull-requests #1068 SUCCESS |
|
RxJava-pull-requests #1069 SUCCESS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1147 (comment) with change from @akarnokd