Skip to content

Commit 93415d1

Browse files
committed
Merge pull request #189 from reactive-streams/wip-fix-identityprocessorverification-√
Removes the use of annotations, switches to test prefix naming
2 parents b73ff9b + 41cd764 commit 93415d1

14 files changed

+612
-607
lines changed

examples/src/test/java/org/reactivestreams/example/unicast/AsyncSubscriberTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public AsyncSubscriberTest() {
6060
}
6161
};
6262

63-
new NumberIterablePublisher<Integer>(0, 10, e).subscribe(sub);
63+
new NumberIterablePublisher(0, 10, e).subscribe(sub);
6464
latch.await(DefaultTimeoutMillis * 10, TimeUnit.MILLISECONDS);
6565
assertEquals(i.get(), 45);
6666
}

tck/README.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,40 @@ Specification rule abides the following naming convention: `spec###_DESC` where:
4545

4646
```java
4747
// Verifies rule: https://github.com/reactive-streams/reactive-streams#1.1
48-
@Required @Test
49-
public void spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable {
48+
@Test public void required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable
5049
// ...
5150
}
5251
```
5352

54-
The annotations on the test methods are used in order to signify the character of the test. For example, these are the kinds of annotations you may find:
53+
The prefixes of the names of the test methods are used in order to signify the character of the test. For example, these are the kinds of prefixes you may find:
54+
"required_", "optional_", "stochastic_", "untested_".
55+
56+
Explanations:
5557

5658
```java
57-
@Required @Test
59+
@Test public void required_spec101_subscriptionRequestMustResultInTheCorrectNumberOfProducedElements() throws Throwable
5860
```
5961

6062
... means that this test case is a hard requirement, it covers a *MUST* or *MUST NOT* Rule of the Specification.
6163

6264

6365
```java
64-
@Additional @Test
66+
@Test public void optional_spec104_mustSignalOnErrorWhenFails() throws Throwable
6567
```
6668

67-
... means that this test case is optional, it covers a *MAY* or *SHOULD* Rule of the Specification. This annotation is also used if more configuration is needed in order to run it, e.g. `@Additional(implement = "createErrorStatePublisher") @Test` signals the implementer that in order to include this test case in his test runs, (s)he must implement the `Publisher<T> createErrorStatePublisher()` method.
69+
... means that this test case is optional, it covers a *MAY* or *SHOULD* Rule of the Specification. This prefix is also used if more configuration is needed in order to run it, e.g. `@Additional(implement = "createErrorStatePublisher") @Test` signals the implementer that in order to include this test case in his test runs, (s)he must implement the `Publisher<T> createErrorStatePublisher()` method.
6870

6971
```java
70-
@Stochastic @Test
72+
@Test public void stochastic_spec103_mustSignalOnMethodsSequentially() throws Throwable
7173
```
7274

7375
... means that the Rule is either racy, and/or inherently hard to verify without heavy modification of the tested implementation. Usually this means that this test case can yield false positives ("be green") even if for some case, the given implementation may violate the tested behaviour.
7476

7577
```java
76-
@NotVerified @Test
78+
@Test public void untested_spec106_mustConsiderSubscriptionCancelledAfterOnErrorOrOnCompleteHasBeenCalled() throws Throwable
7779
```
7880

79-
... means that the test case is not implemented, either because it is inherently hard to verify (e.g. Rules which use the wording "*SHOULD consider X as Y*") or have not been implemented yet (though we hope we have implemented all we could!). Such tests will show up in your test runs as `SKIPPED`, with a message pointing out that the TCK is unable to validate this Rule. We would be delighted if you can figure out a way to deterministically test Rules, which have been marked with this annotation – pull requests are very welcome!
81+
... means that the test case is not implemented, either because it is inherently hard to verify (e.g. Rules which use the wording "*SHOULD consider X as Y*") or have not been implemented yet (though we hope we have implemented all we could!). Such tests will show up in your test runs as `SKIPPED`, with a message pointing out that the TCK is unable to validate this Rule. We would be delighted if you can figure out a way to deterministically test Rules, which have been marked with this prefix – pull requests are very welcome!
8082

8183
### Test isolation
8284

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

-60
This file was deleted.

0 commit comments

Comments
 (0)