Fail test in case of double onError/onComplete signals #122
+15
−3
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.
While updating some Akka streams tests @patriknw discovered we accidentally called onError twice on the overflow protection. We believe
onError
should be a "final" call, according to https://github.com/reactive-streams/reactive-streams#1.7 (the situational rules mentioned in this rule don't apply here IMO).This addition should help to notice such implementation mistakes sooner. Please review @reactive-streams/contributors (I somehow can't get this to be a "ping" hm...).
This PR changes:
spec317_mustSignalOnErrorWhenPendingAboveLongMaxValue
to check that no other errors than the one expected error were signalledonError
andonComplete
calls on the same subscriber. The situational rule linked from1.7
still holds as it states "onError
ifonComplete
failed", which is still allowed with this update of course (we only disallow multipleonError / onComplete
calls)