Skip to content

Commit

Permalink
Enable error state Reactive-Streams TCK verifications for BufferingPu…
Browse files Browse the repository at this point in the history
…blisher (ratpack#436)
  • Loading branch information
rhart committed Sep 4, 2014
1 parent e4160e9 commit b56be91
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package ratpack.stream.tck

import org.reactivestreams.Publisher
import org.reactivestreams.Subscriber
import org.reactivestreams.tck.PublisherVerification
import org.reactivestreams.tck.TestEnvironment

Expand All @@ -42,7 +43,11 @@ class BufferingPublisherVerification extends PublisherVerification<Integer> {

@Override
Publisher<Integer> createErrorStatePublisher() {
// Not sure what this is for yet
null
throttle(new Publisher<Integer>() {
@Override
void subscribe(Subscriber<? super Integer> s) {
s.onError(new RuntimeException("Can't subscribe subcriber: " + s + ", because of reasons."));
}
})
}
}

0 comments on commit b56be91

Please sign in to comment.