File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed
java/org/reactivestreams/example/unicast Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1
1
description = ' reactive-streams-examples'
2
2
dependencies {
3
3
compile project(' :reactive-streams' )
4
+ testCompile project(' :reactive-streams-tck' )
4
5
}
6
+ test. useTestNG()
Original file line number Diff line number Diff line change
1
+ package org .reactivestreams .example .unicast ;
2
+
3
+ import org .reactivestreams .Publisher ;
4
+ import org .reactivestreams .tck .PublisherVerification ;
5
+ import org .reactivestreams .tck .TestEnvironment ;
6
+ import org .testng .annotations .Test ;
7
+
8
+ @ Test
9
+ public class InfiniteIncrementNumberPublisherTest extends PublisherVerification <Integer > {
10
+
11
+ final static long DefaultTimeoutMillis = 100 ;
12
+ final static long PublisherReferenceGCTimeoutMillis = 300 ;
13
+
14
+ public InfiniteIncrementNumberPublisherTest () {
15
+ super (new TestEnvironment (DefaultTimeoutMillis ), PublisherReferenceGCTimeoutMillis );
16
+ }
17
+
18
+ @ Override public Publisher <Integer > createPublisher (long elements ) {
19
+ return new InfiniteIncrementNumberPublisher ();
20
+ }
21
+
22
+ @ Override public Publisher <Integer > createErrorStatePublisher () {
23
+ return null ;
24
+ }
25
+
26
+ @ Override public long maxElementsFromPublisher () {
27
+ return super .publisherUnableToSignalOnComplete ();
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ name : ExamplesSuite
2
+ threadCount : 1
3
+
4
+ tests :
5
+ - name : Examples
6
+ classes :
7
+ - org.reactivestreams.example.unicast.InfiniteIncrementNumberPublisherTest
You can’t perform that action at this time.
0 commit comments