Skip to content

Commit 9cce1cd

Browse files
committed
Fixed #188 by making 2.12 an untested rule, as it cannot be deterministically verified.
1 parent b4f359f commit 9cce1cd

11 files changed

+388
-426
lines changed

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

+117-117
Large diffs are not rendered by default.

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

+34-34
Large diffs are not rendered by default.

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

+22-22
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void setUp() throws Exception {
6767

6868
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.1
6969
@Override @Test
70-
public void required___spec201_blackbox_mustSignalDemandViaSubscriptionRequest() throws Throwable {
70+
public void required_spec201_blackbox_mustSignalDemandViaSubscriptionRequest() throws Throwable {
7171
blackboxSubscriberTest(new BlackboxTestStageTestRun() {
7272
@Override
7373
public void run(BlackboxTestStage stage) throws InterruptedException {
@@ -82,13 +82,13 @@ public void run(BlackboxTestStage stage) throws InterruptedException {
8282

8383
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.2
8484
@Override @Test
85-
public void unverified___spec202_blackbox_shouldAsynchronouslyDispatch() throws Exception {
85+
public void untested_spec202_blackbox_shouldAsynchronouslyDispatch() throws Exception {
8686
notVerified(); // cannot be meaningfully tested, or can it?
8787
}
8888

8989
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.3
9090
@Override @Test
91-
public void required___spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable {
91+
public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnComplete() throws Throwable {
9292
blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {
9393
@Override
9494
public void run(BlackboxTestStage stage) throws Throwable {
@@ -125,7 +125,7 @@ public void cancel() {
125125

126126
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.3
127127
@Override @Test
128-
public void required___spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError() throws Throwable {
128+
public void required_spec203_blackbox_mustNotCallMethodsOnSubscriptionOrPublisherInOnError() throws Throwable {
129129
blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {
130130
@Override
131131
public void run(BlackboxTestStage stage) throws Throwable {
@@ -164,13 +164,13 @@ public void cancel() {
164164

165165
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.4
166166
@Override @Test
167-
public void unverified___spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError() throws Exception {
167+
public void untested_spec204_blackbox_mustConsiderTheSubscriptionAsCancelledInAfterRecievingOnCompleteOrOnError() throws Exception {
168168
notVerified(); // cannot be meaningfully tested, or can it?
169169
}
170170

171171
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.5
172172
@Override @Test
173-
public void required___spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal() throws Exception {
173+
public void required_spec205_blackbox_mustCallSubscriptionCancelIfItAlreadyHasAnSubscriptionAndReceivesAnotherOnSubscribeSignal() throws Exception {
174174
new BlackboxTestStage(env) {{
175175
// try to subscribe another time, if the subscriber calls `probe.registerOnSubscribe` the test will fail
176176
final TestEnvironment.Latch secondSubscriptionCancelled = new TestEnvironment.Latch(env);
@@ -199,26 +199,26 @@ public String toString() {
199199

200200
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.6
201201
@Override @Test
202-
public void unverified___spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid() throws Exception {
202+
public void untested_spec206_blackbox_mustCallSubscriptionCancelIfItIsNoLongerValid() throws Exception {
203203
notVerified(); // cannot be meaningfully tested, or can it?
204204
}
205205

206206
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.7
207207
@Override @Test
208-
public void unverified___spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization() throws Exception {
208+
public void untested_spec207_blackbox_mustEnsureAllCallsOnItsSubscriptionTakePlaceFromTheSameThreadOrTakeCareOfSynchronization() throws Exception {
209209
notVerified(); // cannot be meaningfully tested, or can it?
210210
// the same thread part of the clause can be verified but that is not very useful, or is it?
211211
}
212212

213213
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.8
214214
@Override @Test
215-
public void unverified___spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel() throws Throwable {
215+
public void untested_spec208_blackbox_mustBePreparedToReceiveOnNextSignalsAfterHavingCalledSubscriptionCancel() throws Throwable {
216216
notVerified(); // cannot be meaningfully tested as black box, or can it?
217217
}
218218

219219
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.9
220220
@Override @Test
221-
public void required___spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall() throws Throwable {
221+
public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithPrecedingRequestCall() throws Throwable {
222222
blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {
223223
@Override
224224
public void run(BlackboxTestStage stage) throws Throwable {
@@ -238,7 +238,7 @@ public void run(BlackboxTestStage stage) throws Throwable {
238238

239239
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.9
240240
@Override @Test
241-
public void required___spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall() throws Throwable {
241+
public void required_spec209_blackbox_mustBePreparedToReceiveAnOnCompleteSignalWithoutPrecedingRequestCall() throws Throwable {
242242
blackboxSubscriberWithoutSetupTest(new BlackboxTestStageTestRun() {
243243
@Override
244244
public void run(BlackboxTestStage stage) throws Throwable {
@@ -262,7 +262,7 @@ public void subscribe(Subscriber<? super T> s) {
262262

263263
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.10
264264
@Override @Test
265-
public void required___spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall() throws Throwable {
265+
public void required_spec210_blackbox_mustBePreparedToReceiveAnOnErrorSignalWithPrecedingRequestCall() throws Throwable {
266266
blackboxSubscriberTest(new BlackboxTestStageTestRun() {
267267
@Override
268268
@SuppressWarnings("ThrowableResultOfMethodCallIgnored")
@@ -275,63 +275,63 @@ public void run(BlackboxTestStage stage) throws Throwable {
275275

276276
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.11
277277
@Override @Test
278-
public void unverified___spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents() throws Exception {
278+
public void untested_spec211_blackbox_mustMakeSureThatAllCallsOnItsMethodsHappenBeforeTheProcessingOfTheRespectiveEvents() throws Exception {
279279
notVerified(); // cannot be meaningfully tested, or can it?
280280
}
281281

282282
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.12
283283
@Override @Test
284-
public void required___spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality() throws Throwable {
284+
public void untested_spec212_blackbox_mustNotCallOnSubscribeMoreThanOnceBasedOnObjectEquality() throws Throwable {
285285
notVerified(); // cannot be meaningfully tested as black box, or can it?
286286
}
287287

288288
// Verifies rule: https://github.com/reactive-streams/reactive-streams#2.13
289289
@Override @Test
290-
public void unverified___spec213_blackbox_failingOnSignalInvocation() throws Exception {
290+
public void untested_spec213_blackbox_failingOnSignalInvocation() throws Exception {
291291
notVerified(); // cannot be meaningfully tested, or can it?
292292
}
293293

294294
////////////////////// SUBSCRIPTION SPEC RULE VERIFICATION //////////////////
295295

296296
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.1
297297
@Override @Test
298-
public void unverified___spec301_blackbox_mustNotBeCalledOutsideSubscriberContext() throws Exception {
298+
public void untested_spec301_blackbox_mustNotBeCalledOutsideSubscriberContext() throws Exception {
299299
notVerified(); // cannot be meaningfully tested, or can it?
300300
}
301301

302302
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.8
303303
@Override @Test
304-
public void required___spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced() throws Throwable {
304+
public void required_spec308_blackbox_requestMustRegisterGivenNumberElementsToBeProduced() throws Throwable {
305305
notVerified(); // cannot be meaningfully tested as black box, or can it?
306306
}
307307

308308
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.10
309309
@Override @Test
310-
public void unverified___spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber() throws Exception {
310+
public void untested_spec310_blackbox_requestMaySynchronouslyCallOnNextOnSubscriber() throws Exception {
311311
notVerified(); // cannot be meaningfully tested, or can it?
312312
}
313313

314314
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.11
315315
@Override @Test
316-
public void unverified___spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError() throws Exception {
316+
public void untested_spec311_blackbox_requestMaySynchronouslyCallOnCompleteOrOnError() throws Exception {
317317
notVerified(); // cannot be meaningfully tested, or can it?
318318
}
319319

320320
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.14
321321
@Override @Test
322-
public void unverified___spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists() throws Exception {
322+
public void untested_spec314_blackbox_cancelMayCauseThePublisherToShutdownIfNoOtherSubscriptionExists() throws Exception {
323323
notVerified(); // cannot be meaningfully tested, or can it?
324324
}
325325

326326
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.15
327327
@Override @Test
328-
public void unverified___spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError() throws Exception {
328+
public void untested_spec315_blackbox_cancelMustNotThrowExceptionAndMustSignalOnError() throws Exception {
329329
notVerified(); // cannot be meaningfully tested, or can it?
330330
}
331331

332332
// Verifies rule: https://github.com/reactive-streams/reactive-streams#3.16
333333
@Override @Test
334-
public void unverified___spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber() throws Exception {
334+
public void untested_spec316_blackbox_requestMustNotThrowExceptionAndMustOnErrorTheSubscriber() throws Exception {
335335
notVerified(); // cannot be meaningfully tested, or can it?
336336
}
337337

0 commit comments

Comments
 (0)