Skip to content

Commit 7aadee3

Browse files
committed
Transfers/copies all test annotations from the Publisher/Subscriber Verifications
to the IdentityProcessor-verification so that they are applied for the delegation. Introduces SubscriberWhiteboxVerificationRules, SubscriberBlackboxVerificationRules and PubisherVerificationRules to keep track of and assist in making sure that all tests propagate properly between Subscriber, Publisher and Processor.
1 parent b73ff9b commit 7aadee3

8 files changed

+210
-108
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/src/main/java/org/reactivestreams/tck/Annotations.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ private Annotations() {}
1313
* For example tests like "Publisher SHOULD consider Subscription as ..." - is inherently hard to specifically test.
1414
*/
1515
@Target(ElementType.METHOD)
16-
@Retention(RetentionPolicy.SOURCE)
16+
@Retention(RetentionPolicy.RUNTIME)
1717
static @interface NotVerified {
1818
}
1919

2020
/**
2121
* Used to mark stochastic tests which MAY yield false positives (pass) can violate the tested rule in some specific scenario.
2222
*/
2323
@Target(ElementType.METHOD)
24-
@Retention(RetentionPolicy.SOURCE)
24+
@Retention(RetentionPolicy.RUNTIME)
2525
static @interface Stochastic {
2626
}
2727

2828
/**
2929
* Used to mark tests that MUST pass in all (even very restricted types of) Publishers / Subscribers.
3030
*/
3131
@Target(ElementType.METHOD)
32-
@Retention(RetentionPolicy.SOURCE)
32+
@Retention(RetentionPolicy.RUNTIME)
3333
static @interface Required {
3434
}
3535

@@ -38,7 +38,7 @@ private Annotations() {}
3838
* If an implementation declares it does not support enough subscribers as needed by such test, it will be SKIPPed instead of FAILed.
3939
*/
4040
@Target(ElementType.METHOD)
41-
@Retention(RetentionPolicy.SOURCE)
41+
@Retention(RetentionPolicy.RUNTIME)
4242
static @interface Subscribers {
4343
long value() default 1;
4444
}
@@ -48,7 +48,7 @@ private Annotations() {}
4848
* These tests can be skipped by returning null from the given factory method.
4949
*/
5050
@Target(ElementType.METHOD)
51-
@Retention(RetentionPolicy.SOURCE)
51+
@Retention(RetentionPolicy.RUNTIME)
5252
static @interface Additional {
5353
/** Description of situation when it's OK to not pass this test */
5454
String value() default "";

0 commit comments

Comments
 (0)