You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tck/README.md
+53-17
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ not possible (or viable) to construct automated tests, thus the TCK does not cla
13
13
The TCK is split up into 4 files JUnit 4 test classes which should be extended by implementers, providing their `Publisher` / `Subscriber` implementations for the test harness to validate them. The tests are split in the following way:
14
14
15
15
*`PublisherVerification`
16
-
*`SubscriberBlackboxVerification`
17
16
*`SubscriberWhiteboxVerification`
17
+
*`SubscriberBlackboxVerification`
18
18
*`IdentityProcessorVerification`
19
19
20
20
The next sections include examples on how these can be used and describe the various configuration options.
@@ -38,8 +38,9 @@ Since the TCK is aimed at Reactive Stream implementers, looking into the sources
38
38
and should help during a libraries implementation cycle.
39
39
40
40
In order to make mapping between test cases and Specification rules easier, each test case covering a specific
41
-
Specification rule abides the following naming convention: `spec###_DESC` where:
41
+
Specification rule abides the following naming convention: `TYPE_spec###_DESC` where:
42
42
43
+
*`TYPE` is one of: `required`, `optional`, `stochastic` or `untested` which describe if this test is covering a Rule that MUST or SHOULD be implemented. The specific words are explained in detail below.
43
44
*`###` is the Rule number (`1.xx` Rules are about Publishers, `2.xx` Rules are about Subscribers etc.)
44
45
*`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.
... 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.
70
+
... 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 = "createFailedPublisher") @Test` signals the implementer that in order to include this test case in his test runs, (s)he must implement the `Publisher<T> createFailedPublisher()` method.
notVerified("Unable to implement test because ...");
505
+
@Override
506
+
publicPublisher<Integer>createFailedPublisher() {
507
+
returnnull; // skip error publisher tests
477
508
}
478
509
479
510
}
480
511
```
481
512
482
-
## Upgrade story
513
+
## Upgrading the TCK to newer versions
514
+
While we do not expect the Reactive Streams specification to change in the forseeable future,
515
+
it may happen that some semantics may need changing in the future. In this case you should expect test
516
+
methods being phased out in terms of deprecation or removal, new tests may also be added over time.
483
517
484
-
**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).
518
+
In general this should not be of much concern to you, unless you override test methods in your test suite.
519
+
We ask implementers who find the need of overriding provided test methods to reach out via opening tickets
520
+
on the `reactive-streams/reactive-streams-jvm` project, so we can discuss the use case and, most likely, improve the TCK.
485
521
486
522
## Using the TCK from other languages
487
523
@@ -504,7 +540,7 @@ class IterablePublisherTest(env: TestEnvironment, publisherShutdownTimeout: Long
0 commit comments