Spring 5.0 Projects
上QQ阅读APP看书,第一时间看更新

Reactive Streams TCK

Implementing the interfaces defined in Reactive Streams specification is not just suffice to build Reactive Streams. The specification comprises a set of components and rules. The components part is taken care of with four interfaces we discussed, while the rules are defined by Reactive Streams Technology Compatibility Kit (TCK).

The Reactive Streams TCK is a guideline to Reactive Streams implementors to verify their implementations against the rules defined in the specifications. The TCK is developed with a testing framework in Java called TestNG and can be used in other JVM-based programming languages, like Kotlin and Scala. 

TCK covers most of the rules, but not all, defined in the specification because for some of the rules, it is not possible to construct automated test cases. So theoretically, it can't be verified fully against the specification; however, it is helpful to validate most of the important rules.

TCK comprises four TestNG test classes and contains test cases, which can be extended by implementers and provide their implementation of Publisher, Subscriber, Subscription, and Processor to validate against the specification rules. You can get it in further detail from the link: https://github.com/reactive-streams/reactive-streams-jvm/tree/master/tck.