Skip to content

Commit 0b055a5

Browse files
committed
+TCK verifyNoAsyncErrors now by default waits, fixes spec111
Resolves reactive-streams#239
1 parent bca27f5 commit 0b055a5

9 files changed

+168
-143
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The Reactive Streams project welcomes contributions from anybody who wants to pa
44

55
## Copyright Statement
66

7-
The aforementioned waiver of copyrights and other rights is represented by the addition of a line to the file [CopyrightWaivers.txt](https://github.com/reactive-streams/reactive-streams/blob/master/CopyrightWaivers.txt). For a pull request to be considered every contributor must have signed the copyright statement in this way; this may be included within that same pull request.
7+
The aforementioned waiver of copyrights and other rights is represented by the addition of a line to the file [CopyrightWaivers.txt](https://github.com/reactive-streams/reactive-streams-jvm/blob/master/CopyrightWaivers.txt). For a pull request to be considered every contributor must have signed the copyright statement in this way; this may be included within that same pull request.
88

99
## Gatekeepers
1010

CopyrightWaivers.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ waiver with respect to the entirety of my contributions.
1212

1313
The text of the copyright statement is included in the COPYING file at the root
1414
of the reactive-streams repository at
15-
https://github.com/reactive-streams/reactive-streams/blob/master/COPYING.
15+
https://github.com/reactive-streams/reactive-streams-jvm/blob/master/COPYING.
1616

1717
Underwriting parties:
1818

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ followed by a possibly unbounded number of `onNext` signals (as requested by `Su
7272

7373
### SPECIFICATION
7474

75-
#### 1. Publisher ([Code](https://github.com/reactive-streams/reactive-streams/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Publisher.java))
75+
#### 1. Publisher ([Code](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Publisher.java))
7676

7777
```java
7878
public interface Publisher<T> {
@@ -96,7 +96,7 @@ public interface Publisher<T> {
9696

9797
[<a name="footnote-1-1">1</a>] : A stateful Publisher can be overwhelmed, bounded by a finite number of underlying resources, exhausted, shut-down or in a failed state.
9898

99-
#### 2. Subscriber ([Code](https://github.com/reactive-streams/reactive-streams/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Subscriber.java))
99+
#### 2. Subscriber ([Code](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Subscriber.java))
100100

101101
```java
102102
public interface Subscriber<T> {
@@ -125,7 +125,7 @@ public interface Subscriber<T> {
125125
126126
[<a name="footnote-2-1">1</a>] : See JMM definition of Happen-Before in section 17.4.5. on http://docs.oracle.com/javase/specs/jls/se7/html/jls-17.html
127127
128-
#### 3. Subscription ([Code](https://github.com/reactive-streams/reactive-streams/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Subscription.java))
128+
#### 3. Subscription ([Code](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Subscription.java))
129129
130130
```java
131131
public interface Subscription {
@@ -162,7 +162,7 @@ public interface Subscription {
162162
163163
A `Subscription` is shared by exactly one `Publisher` and one `Subscriber` for the purpose of mediating the data exchange between this pair. This is the reason why the `subscribe()` method does not return the created `Subscription`, but instead returns `void`; the `Subscription` is only passed to the `Subscriber` via the `onSubscribe` callback.
164164
165-
#### 4.Processor ([Code](https://github.com/reactive-streams/reactive-streams/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Processor.java))
165+
#### 4.Processor ([Code](https://github.com/reactive-streams/reactive-streams-jvm/blob/v1.0.0.RC3/api/src/main/java/org/reactivestreams/Processor.java))
166166
167167
```java
168168
public interface Processor<T, R> extends Subscriber<T>, Publisher<R> {

tck/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Reactive Streams TCK #
22

33
The purpose of the *Reactive Streams Technology Compatibility Kit* (from here on referred to as: *the TCK*) is to guide
4-
and help Reactive Streams library implementers to validate their implementations against the rules defined in [the Specification](https://github.com/reactive-streams/reactive-streams).
4+
and help Reactive Streams library implementers to validate their implementations against the rules defined in [the Specification](https://github.com/reactive-streams/reactive-streams-jvm).
55

66
The TCK is implemented using **plain Java (1.6)** and **TestNG** tests, and should be possible to use from other languages and testing libraries (such as Scala, Groovy, JRuby or others).
77

@@ -30,7 +30,7 @@ The TCK is provided as binary artifact on [Maven Central](http://search.maven.or
3030
</dependency>
3131
```
3232

33-
Please refer to the [Reactive Streams Specification](https://github.com/reactive-streams/reactive-streams) for the current latest version number. Make sure that the API and TCK dependency versions are equal.
33+
Please refer to the [Reactive Streams Specification](https://github.com/reactive-streams/reactive-streams-jvm) for the current latest version number. Make sure that the API and TCK dependency versions are equal.
3434

3535
### Types of tests
3636

@@ -44,7 +44,7 @@ Specification rule abides the following naming convention: `spec###_DESC` where:
4444
* `DESC` is a short explanation of what exactly is being tested in this test case, as sometimes one Rule may have multiple test cases in order to cover the entire Rule.
4545

4646
```java
47-
// Verifies rule: https://github.com/reactive-streams/reactive-streams#1.1
47+
// Verifies rule: https://github.com/reactive-streams/reactive-streams-jvm#1.1
4848
@Test public void required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable
4949
// ...
5050
}
@@ -195,7 +195,7 @@ Notable configuration options include:
195195
### Timeout configuration
196196
Publisher tests make use of two kinds of timeouts, one is the `defaultTimeoutMillis` which corresponds to all methods used
197197
within the TCK which await for something to happen. The other timeout is `publisherReferenceGCTimeoutMillis` which is only used in order to verify
198-
[Rule 3.13](https://github.com/reactive-streams/reactive-streams#3.13) which defines that subscriber references MUST be dropped
198+
[Rule 3.13](https://github.com/reactive-streams/reactive-streams-jvm#3.13) which defines that subscriber references MUST be dropped
199199
by the Publisher.
200200

201201
In order to configure these timeouts (for example when running on a slow continious integtation machine), you can either:
@@ -505,7 +505,7 @@ public class SkippingIdentityProcessorTest extends IdentityProcessorVerification
505505

506506
## Upgrade story
507507

508-
**TODO** - What is our story about updating the TCK? How do we make sure that implementations don't accidentally miss some change in the spec, if the TCK is unable to fail verify the new behavior? Comments are very welcome, discussion about this is under-way in [Issue #99 – TCK Upgrade Story](https://github.com/reactive-streams/reactive-streams/issues/99).
508+
**TODO** - What is our story about updating the TCK? How do we make sure that implementations don't accidentally miss some change in the spec, if the TCK is unable to fail verify the new behavior? Comments are very welcome, discussion about this is under-way in [Issue #99 – TCK Upgrade Story](https://github.com/reactive-streams/reactive-streams-jvm/issues/99).
509509

510510
## Using the TCK from other languages
511511

tck/src/main/java/org/reactivestreams/tck/IdentityProcessorVerification.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public long maxElementsFromPublisher() {
152152
* {@code Subscription} actually solves the "unbounded recursion" problem by not allowing the number of
153153
* recursive calls to exceed the number returned by this method.
154154
*
155-
* @see <a href="https://github.com/reactive-streams/reactive-streams#3.3">reactive streams spec, rule 3.3</a>
155+
* @see <a href="https://github.com/reactive-streams/reactive-streams-jvm#3.3">reactive streams spec, rule 3.3</a>
156156
* @see PublisherVerification#required_spec303_mustNotAllowUnboundedRecursion()
157157
*/
158158
public long boundedDepthOfOnNextAndRequestRecursion() {
@@ -208,7 +208,7 @@ public void required_validate_boundedDepthOfOnNextAndRequestRecursion() throws E
208208
}
209209

210210
/////////////////////// DELEGATED TESTS, A PROCESSOR "IS A" PUBLISHER //////////////////////
211-
// Verifies rule: https://github.com/reactive-streams/reactive-streams#4.1
211+
// Verifies rule: https://github.com/reactive-streams/reactive-streams-jvm#4.1
212212

213213
@Test
214214
public void required_createPublisher1MustProduceAStreamOfExactly1Element() throws Throwable {
@@ -380,7 +380,7 @@ public void required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue()
380380
publisherVerification.required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue();
381381
}
382382

383-
// Verifies rule: https://github.com/reactive-streams/reactive-streams#1.4
383+
// Verifies rule: https://github.com/reactive-streams/reactive-streams-jvm#1.4
384384
// for multiple subscribers
385385
@Test
386386
public void required_spec104_mustCallOnErrorOnAllItsSubscribersIfItEncountersANonRecoverableError() throws Throwable {
@@ -408,14 +408,14 @@ public TestSetup apply(Long aLong) throws Throwable {
408408
sub1.expectError(ex);
409409
sub2.expectError(ex);
410410

411-
env.verifyNoAsyncErrors();
411+
env.verifyNoAsyncErrorsNoDelay();
412412
}};
413413
}
414414
});
415415
}
416416

417417
////////////////////// SUBSCRIBER RULES VERIFICATION ///////////////////////////
418-
// Verifies rule: https://github.com/reactive-streams/reactive-streams#4.1
418+
// Verifies rule: https://github.com/reactive-streams/reactive-streams-jvm#4.1
419419

420420
// A Processor
421421
// must obey all Subscriber rules on its consuming side
@@ -480,12 +480,12 @@ public void mustImmediatelyPassOnOnErrorEventsReceivedFromItsUpstreamToItsDownst
480480
sendError(ex);
481481
sub.expectError(ex); // "immediately", i.e. without a preceding request
482482

483-
env.verifyNoAsyncErrors();
483+
env.verifyNoAsyncErrorsNoDelay();
484484
}};
485485
}
486486

487487
/////////////////////// DELEGATED TESTS, A PROCESSOR "IS A" SUBSCRIBER //////////////////////
488-
// Verifies rule: https://github.com/reactive-streams/reactive-streams#4.1
488+
// Verifies rule: https://github.com/reactive-streams/reactive-streams-jvm#4.1
489489

490490
@Test
491491
public void required_exerciseWhiteboxHappyPath() throws Throwable {
@@ -668,7 +668,7 @@ public TestSetup apply(Long subscribers) throws Throwable {
668668
sub1.expectCompletion(env.defaultTimeoutMillis());
669669
sub2.expectCompletion(env.defaultTimeoutMillis());
670670

671-
env.verifyNoAsyncErrors();
671+
env.verifyNoAsyncErrorsNoDelay();
672672
}};
673673
}
674674
});

0 commit comments

Comments
 (0)