-
Notifications
You must be signed in to change notification settings - Fork 530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] TCK for j.u.c.Flow types "directly" #398
[WIP] TCK for j.u.c.Flow types "directly" #398
Conversation
tck-flow/README.md
Outdated
The purpose of the *Reactive Streams Technology Compatibility Kit* (from here on referred to as: *the TCK*) is to guide | ||
and help Reactive Streams library implementers to validate their implementations against the rules defined in [the Specification](https://github.com/reactive-streams/reactive-streams-jvm). | ||
|
||
The TCK is implemented using **plain Java (1.6)** and **TestNG** tests, and should be possible to use from other JVM-based languages and testing libraries. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO fix this wording or link to the other README instead?
final public Publisher<T> createPublisher(long elements) { | ||
final Flow.Publisher<T> flowPublisher = createFlowPublisher(elements); | ||
return ReactiveStreamsFlowBridge.toReactiveStreams(flowPublisher); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose this style of abstract class FlowPublisherVerification<T> extends PublisherVerification<T> {
and the adapter logic in here so we can not duplicate code between the TCKs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems sound to me, are there any downsides?
(I commented the 2 places which matter, the rest is to be cleaned up before review -- will ping soon) |
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=http\://services.gradle.org/distributions/gradle-4.0.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https
doesn't work with the JDK 7 build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm this change must have happened automatically somehow, perhaps intellij did it?
I'll remove any gradle-wrapper touching things from this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso I believe this line is breaking Travis. Revert?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso as in, revert the Gradle-script-related changes in this PR
} | ||
|
||
project(':reactive-streams').projectDir = "$rootDir/api" as File | ||
project(':reactive-streams-tck').projectDir = "$rootDir/tck" as File | ||
project(':reactive-streams-examples').projectDir = "$rootDir/examples" as File | ||
if (jdkFlow) { | ||
project(':reactive-streams-flow-bridge').projectDir = "$rootDir/flow-bridge" as File | ||
project(':reactive-streams-tck-flow').projectDir = "$rootDir/tck-flow" as File |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flow-tck? (to align better with flow-bridge?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @ktoso should we change this here or open a new PR to discuss naming?
tck-flow/README.md
Outdated
@@ -0,0 +1,623 @@ | |||
# Reactive Streams TCK # |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps: "Reactive Streams TCK for java.util.concurrent.Flow"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, working on this today; should be done in one hour :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the name proposal btw, using that 👍
public Subscriber<T> createSubscriber() { | ||
return null; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no "createFlowSubscriber"-method here, intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this could use some bridge method helpers as well.
return createFlowSubscriber(probe); | ||
} | ||
|
||
protected abstract Subscriber<T> createFlowSubscriber(WhiteboxSubscriberProbe<T> probe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't "Subscriber" here be Flow.Subscriber?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, good catch - have not completed the whitebox (as mentioned, for review here was the "style" how we'll integrate – in the 2 places I put comments). Rest will be done shortly
@Override | ||
public Publisher<Integer> createFlowPublisher(long elements) { | ||
return ReactiveStreamsFlowBridge.toFlow( | ||
new AsyncIterablePublisher<>(Collections.emptyList(), ex) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these subprojects are still target 6 so diamond doesn't work:
https://travis-ci.org/reactive-streams/reactive-streams-jvm/jobs/285055684#L1494
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa right thanks
@@ -0,0 +1 @@ | |||
9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(can remove later, makes jenv
use jdk9)
* @param reactiveStreamsSubscriber the Reactive Streams Subscriber instance to convert | ||
* @return the equivalent Flow Subscriber | ||
*/ | ||
public static <T> Flow.Subscriber<T> toFlow(org.reactivestreams.Subscriber<T> reactiveStreamsSubscriber) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cherry picked #399 assuming we'll merge that addition before this PR though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can adjust naming after merging #399 as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeap, I don't mind merging it as-is :) esp since this will want to base on it
ab740f3
to
d535fa3
Compare
@ktoso Is there something I can help out with here? The build failed due to: https://travis-ci.org/reactive-streams/reactive-streams-jvm/jobs/288243586 |
If you'd like to help me in fixing that cast please do. It's an incomplete change to "the other mirrored type" somewhere in whitebox. My schedule was somewhat insane the last weeks... |
@ktoso I'll take a stab at it! |
Thanks, I'll get in touch once back home today (in a few hours) |
The following diff makes the pr green on my machine, wdyt @ktoso? diff --git a/tck/src/test/java/org/reactivestreams/tck/BrokenExampleBlackboxTest.java b/tck/src/test/java/org/reactivestreams/tck/BrokenExampleBlackboxTest.java
index c3ad206..a6ff4ab 100644
--- a/tck/src/test/java/org/reactivestreams/tck/BrokenExampleBlackboxTest.java
+++ b/tck/src/test/java/org/reactivestreams/tck/BrokenExampleBlackboxTest.java
@@ -53,13 +53,16 @@ public class BrokenExampleBlackboxTest extends SubscriberBlackboxVerification<In
private Subscription subscription;
@Override
- public void onSubscribe(Subscription subscription) {
- this.subscription = subscription;
- subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
+ public void onSubscribe(Subscription subscription) {
+ if (this.subscription == null) {
+ this.subscription = subscription;
+ subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
+ } else subscription.cancel();
}
@Override
- public void onNext(T item) {
+ public void onNext(T item) {
+ if (item == null) throw null;
System.out.println("Got : " + item);
subscription.request(1); //a value of Long.MAX_VALUE may be considered as effectively unbounded
}
diff --git a/tck/src/test/java/org/reactivestreams/tck/BrokenExampleWhiteboxTest.java b/tck/src/test/java/org/reactivestreams/tck/BrokenExampleWhiteboxTest.java
index 4f564af..0d92a1d 100644
--- a/tck/src/test/java/org/reactivestreams/tck/BrokenExampleWhiteboxTest.java
+++ b/tck/src/test/java/org/reactivestreams/tck/BrokenExampleWhiteboxTest.java
@@ -33,7 +33,7 @@ public class BrokenExampleWhiteboxTest extends SubscriberBlackboxVerification<In
}
@Override public void triggerRequest(final Subscriber<? super Integer> subscriber) {
- ((MySubscriber<Integer>)subscriber).triggerDemand(1);
+ ((SyncTriggeredDemandSubscriber<?>)subscriber).triggerDemand(1);
}
@Override public Subscriber<Integer> createSubscriber() { |
Pretty sure that's not enough; you have to run |
./gradlew clean check passed w. that patch on my box. What is failing for you? |
For one thing, you modified files in |
Going to work on this now and report back tho |
I think that is a UX problem, you think you're running all tests but that's
only the case if it uses the right JRE.
I'll open an issue later to see how we can improve the ergonomics there.
On Oct 29, 2017 08:04, "ktoso" <notifications@github.com> wrote:
For one thing, you modified files in tck, while the issues are in tck-flow
so..
You have to run using JDK9 for the JDK9 TCK to be executed
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAqd1tQN6464cZI4fPNhnIJdJ4P_kd3ks5sxCN5gaJpZM4PxsFt>
.
|
I'll have to investigate more later, but that was what was failing on my
box when I ran test tests.
Thanks for having a look, Konrad.
…--
Cheers,
√
On Oct 29, 2017 08:10, "Viktor Klang" ***@***.***> wrote:
I think that is a UX problem, you think you're running all tests but
that's only the case if it uses the right JRE.
I'll open an issue later to see how we can improve the ergonomics there.
On Oct 29, 2017 08:04, "ktoso" ***@***.***> wrote:
For one thing, you modified files in tck, while the issues are in tck-flow
so..
You have to run using JDK9 for the JDK9 TCK to be executed
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAqd1tQN6464cZI4fPNhnIJdJ4P_kd3ks5sxCN5gaJpZM4PxsFt>
.
|
And perhaps another message if running on JDK8 to alert that full suite is
not able to run?
…--
Cheers,
√
On Oct 29, 2017 08:20, "ktoso" ***@***.***> wrote:
Yeah UX wise we have a message: println("Java 9 Flow API found") but it's
hard to notice I guess, changed to more colourful big green/red thingy now:
[image: 1__bash]
<https://user-images.githubusercontent.com/120979/32141480-fa1fe11c-bcc4-11e7-974e-71fdd708cdc1.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAqdyq93gO4QDLC5iUaIDMQ5T0SW0neks5sxCc1gaJpZM4PxsFt>
.
|
Yeah as I mentioned green/red ;) Red is:
|
👍
…--
Cheers,
√
On Oct 29, 2017 08:22, "ktoso" ***@***.***> wrote:
Yeah as I mentioned green/red ;) Red is:
try {
Class.forName("java.util.concurrent.Flow")
jdkFlow = true
println(ANSI_GREEN + " INFO: ------------------ JDK9 classes detected ---------------------------------" + ANSI_RESET)
println(ANSI_GREEN + " INFO: Java 9 Flow API found; Including [flow-bridge, tck-flow] in build." + ANSI_RESET)
println(ANSI_GREEN + " INFO: --------------------------------------------------------------------------" + ANSI_RESET)
} catch (Throwable ex) {
// Flow API not available
println(ANSI_RED + "WARNING: ------------------ JDK9 classes NOT detected -----------------------------" + ANSI_RESET)
println(ANSI_RED + "WARNING: Java 9 Flow API not found; Not including [flow-bridge, tck-flow] in build." + ANSI_RESET)
println(ANSI_RED + "WARNING: --------------------------------------------------------------------------" + ANSI_RESET)
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#398 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAqd9O-n6ogoYtnVG1oD3N4dPIEzASzks5sxCfKgaJpZM4PxsFt>
.
|
* @return the equivalent Reactive Streams Subscriber | ||
======= | ||
* @return the equivalent Flow Subscriber | ||
>>>>>>> 376b159... Java 9 Flow bridge: add Subscriber converters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge conflict
|
||
@Override | ||
public void onSubscribe(org.reactivestreams.Subscription s) { | ||
flow.onSubscribe(new FlowToReactiveSubscription(s)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is hiding when nulls are passed into onSubscribe.
We might have to do: flow.onSubscribe((s != null) ? new FlowToReactiveSubscription(s) : null)
final Flow.Processor<? super T, ? extends U> flow; | ||
|
||
public ReactiveToFlowProcessor(Flow.Processor<? super T, ? extends U> flow) { | ||
this.flow = flow; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
require non-null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is guarded against:
if (reactiveStreamsProcessor == null) {
throw new NullPointerException("reactiveStreamsProcessor");
}
if (reactiveStreamsProcessor instanceof Flow.Processor) {
return (Flow.Processor<T, U>)reactiveStreamsProcessor;
}
if (reactiveStreamsProcessor instanceof ReactiveToFlowProcessor) {
return (Flow.Processor<T, U>)(((ReactiveToFlowProcessor<T, U>)reactiveStreamsProcessor).flow);
}
return new FlowToReactiveProcessor<T, U>(reactiveStreamsProcessor);
@ktoso I believe I've fixed it in this commit: 77ba72f (pushed as a separate branch to avoid having multiple writers to the PR) feel free to cherry-pick from https://github.com/reactive-streams/reactive-streams-jvm/compare/wip-flow-tck-%E2%88%9A |
54a8975
to
db96849
Compare
Pushed over the finish line thanks to @viktorklang |
@ktoso Would you mind, when you remove the changes to gradle, to add the following patch to make sure that the conversions are stable? diff --git a/flow-bridge/src/test/java/org/reactivestreams/ReactiveStreamsFlowBridgeTest.java b/flow-bridge/src/test/java/org/reactivestreams/ReactiveStreamsFlowBridgeTest.java
index 03573a0..e74555e 100644
--- a/flow-bridge/src/test/java/org/reactivestreams/ReactiveStreamsFlowBridgeTest.java
+++ b/flow-bridge/src/test/java/org/reactivestreams/ReactiveStreamsFlowBridgeTest.java
@@ -175,4 +175,60 @@ public class ReactiveStreamsFlowBridgeTest {
Assert.assertNull(state[1]);
}
+
+ @Test
+ public void stableConversionForSubscriber() {
+ Subscriber<Integer> rsSub = new Subscriber<Integer>() {
+ @Override public void onSubscribe(Subscription s) {};
+ @Override public void onNext(Integer i) {};
+ @Override public void onError(Throwable t) {};
+ @Override public void onComplete() {};
+ };
+
+ Flow.Subscriber<Integer> fSub = new Flow.Subscriber<Integer>() {
+ @Override public void onSubscribe(Flow.Subscription s) {};
+ @Override public void onNext(Integer i) {};
+ @Override public void onError(Throwable t) {};
+ @Override public void onComplete() {};
+ };
+
+ Assert.assertSame(ReactiveStreamsFlowBridge.toReactiveStreamsSubscriber(ReactiveStreamsFlowBridge.toFlowSubscriber(rsSub)), rsSub);
+ Assert.assertSame(ReactiveStreamsFlowBridge.toFlowSubscriber(ReactiveStreamsFlowBridge.toReactiveStreamsSubscriber(fSub)), fSub);
+ }
+
+ @Test
+ public void stableConversionForProcessor() {
+ Processor<Integer, Integer> rsPro = new Processor<Integer, Integer>() {
+ @Override public void onSubscribe(Subscription s) {};
+ @Override public void onNext(Integer i) {};
+ @Override public void onError(Throwable t) {};
+ @Override public void onComplete() {};
+ @Override public void subscribe(Subscriber s) {};
+ };
+
+ Flow.Processor<Integer, Integer> fPro = new Flow.Processor<Integer, Integer>() {
+ @Override public void onSubscribe(Flow.Subscription s) {};
+ @Override public void onNext(Integer i) {};
+ @Override public void onError(Throwable t) {};
+ @Override public void onComplete() {};
+ @Override public void subscribe(Flow.Subscriber s) {};
+ };
+
+ Assert.assertSame(ReactiveStreamsFlowBridge.toReactiveStreams(ReactiveStreamsFlowBridge.toFlow(rsPro)), rsPro);
+ Assert.assertSame(ReactiveStreamsFlowBridge.toFlow(ReactiveStreamsFlowBridge.toReactiveStreams(fPro)), fPro);
+ }
+
+ @Test
+ public void stableConversionForPublisher() {
+ Publisher<Integer> rsPub = new Publisher<Integer>() {
+ @Override public void subscribe(Subscriber s) {};
+ };
+
+ Flow.Publisher<Integer> fPub = new Flow.Publisher<Integer>() {
+ @Override public void subscribe(Flow.Subscriber s) {};
+ };
+
+ Assert.assertSame(ReactiveStreamsFlowBridge.toReactiveStreams(ReactiveStreamsFlowBridge.toFlow(rsPub)), rsPub);
+ Assert.assertSame(ReactiveStreamsFlowBridge.toFlow(ReactiveStreamsFlowBridge.toReactiveStreams(fPub)), fPub);
+ }
} |
@ktoso I'm taking a stab at adding my patch and removing the gradle bits. |
@ktoso Realized while trying to apply the patch that with the new method naming we get ambiguity for Processors—can one coerce javac to be smarter about overload resolution? |
Fixes so that the dist url for gradle is http iso https (TravisCI bug?) Adds regression test for bridge converters.
@reactive-streams/contributors My PR (ktoso#2) updates the naming to: toX (for RS) The rationale is that RS Subscriber is Subscriber and Flow Subscriber is Flow.Subscriber. So given that mnemonic it should be easy to read and write. (And no overload resolution problems with Processor) |
Renames the converters to "toX" for RS and "toFlowX" for Flow.
Lookin good, merged it; Final question is about the "Bridge" vs "Adapters" classname, but if no one minds the bridge I'd be possible to be convinced to keep it ;) |
public interface SubscriberPuppet { | ||
/** | ||
* Trigger {@code request(elements)} on your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing Subscriber
, @ktoso
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
import java.util.concurrent.Executors; | ||
|
||
@Test | ||
public class BrokenExampleBlackboxTest extends SubscriberBlackboxVerification<Integer> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktoso What is the purpose of the "Broken" tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch... I think this leaked from some working branch where I used those to break rules to see if they fail nicely -- removing both.
@ktoso LGTM after addressing comments.
|
Addressed comments, removed the "Broken" classes. Naming things I guess would be better as separate PR? |
Thanks @ktoso! @reactive-streams/committers Is this good to merge? We'll have a naming discussion separately. |
|
||
@Override | ||
public Flow.Publisher<Integer> createFlowPublisher(long elements) { | ||
// FIXME how to do source dependencies between test scopes in gradle? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to have a native Flow-based implementation rather than using the RS version because the bridge will otherwise skipped due to toRS(toFlow(rs)) == rs
"optimizing away" the two conversions.
Otherwise, here is a way to use test output from other modules:
https://github.com/akarnokd/RxJava3-preview/blob/master/interop/build.gradle#L7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I'll remove the FIXME then I guess
👍 |
This should be ready then, thanks for review @viktorklang @akarnokd |
af596e1
to
b476efb
Compare
b476efb
to
0f7c0f2
Compare
@reactive-streams/contributors Merging this an opening an Issue to discuss artifact and converter naming. |
* Repairs formatting issue of tables in spec README * Modifies rules 1.09 and 2.13 to mandate `java.lang.NullPointerException` be thrown. Updates the TCK, Spec and example implementations. * Fixes reactive-streams#211 by clarifying * Fixes reactive-streams#210 by removing 1.12 and repurposing its TCK checks for 1.09 * Clarifies the signalling sequence in the spec and adds TCK verification to ensure signal ordering is proper, also amends the examples to reflect the spec change. * Publish 1.0.0.RC2 fix reactive-streams#215 * Fixes reactive-streams#217 by including the examples project in the publish task * =tck minor test name fixup, it is a required test * fix reactive-streams#212 issue on spec 213 testing wrt Processor * RC3 release /w reactive-streams#222 fix * remove rule 1:12 (produce same elements to all Subscribers) This rule is in conflict with 1:11 which allows a Publisher to treat multiple Subscribers as either as unicast or multicast recipients. The verification of proper multicast behavior (which 1:12 specified) has been retained, the test methods renamed accordingly. * fix three left-over references to deleted rule 1:12 * Fixed wrong footnote reference in README.md * Addresses a couple of typos in the examples for AsyncSubscriber and SyncSubscriber * !TCK clarify what error publisher is + add better readme on what this method is + add better javadoc on this method - removes reference to old style spec annotation from readme + proposing to change method name to "createFailed..." as it is the wording used in the spec and reactive manifesto (footnote 1.1) + more info in tck/README that it is not legal to signal on* before sub Resolves reactive-streams#237, reactive-streams#235 * +tck reactive-streams#236 example subscriber whitebox tested, and whitebox fixed * add space to javadoc * +TCK verifyNoAsyncErrors now by default waits, fixes spec111 Resolves reactive-streams#239 * =tck general tck/readme.md cleanup so it matches current code / spec Resolves reactive-streams#99 Depends on reactive-streams#241 * Addresses PR review comments for reactive-streams#246 * Update CopyrightWaivers.txt * +tck explains createElement in more useful terms resolves reactive-streams#231 * +tck reactive-streams#232 explain which tests are mendatory to be "compliant" * Update SubscriberWhiteboxVerification.java Fixes Javadoc generation on Java8+ by having to manually qualify nested classes. * Fixes reactive-streams#233 by implementing support for triggered demand in in the SubscriberBlackboxVerification * Travis PR validation using both JDK 6 and 8 By validating on both JDKs we know the project even builds on 8, while not using features (classes) from JDK8 - so it's still usable for JDK6 projects. Resolves reactive-streams#254 * Small touchups to the TCK README.md * Release 1.0.0.RC4 * Cancel the subscription after receiving all of the pertinent emissions (reactive-streams#259). * Test that 'required_spec317_mustNotSignalOnErrorWhenPendingAboveLongMaxValue' completes in a timely manner for fully synchronous publishers (reactive-streams#259). * =tck untested spec308 rule method name adjusted * -tck rm undocumented and unused publisherReferenceGCTimeoutMillis method * update version to 1.0.0.RC5 * Updating documentation to reflect the current version: RC5 * update ref to 1.0.0.final * change 1.0.0.final to 1.0.0 and make sure OSGI manifest has the bundle version * OSGI fix * OSGI fix... * Disambiguate "processing elements" The document generally refers to "elements" as objects traversing a stream. I initially considered simply editing "processing elements" to read "processing components", but there's a section devoted to the definition of this, so better to link them. * Added per request of @viktorklang in reactive-streams#269 * add CC0 label to README * =tck reactive-streams#279 improve completion latch error message * Rename SyncSybscriber.foreach to whenNext * Update README.md Spelling of the company name is Red Hat, not RedHat. * I hereby represent [...] public domain [...] entirety of my contributions. Requested by @viktorklang. * Log test output events to the console * Remove "preview" qualifier from README. * Unbreaks TravisCI OpenJDK6 hostname too long crash * Second attempt at unbreaking the Travis build * Third attempt at fixing the Travis builds * +tck reactive-streams#308 allow configuring "no events during N time" separately * Update to Gradle 2.12 * Reintegrate dangling footnote in Publisher section. - integrate the footnote in rule 1.9 - sign the Copyright Statement * Asynchronous vs Synchronous Processing: reword "push-based stream" * =tck fixes minor misalignment between code and comment, found via .NET port Semantics remain exacly the same, the error we're testing here is about signaling one more element if request comes in again (which we'll do anyway, regardless of status of this flag) * adjust Subscription.cancel javadoc because cancel command does not have to be called asynchronously * Updating Typesafe to Lightbend * Fix a typo in org.reactivestreams.example.unicast.AsyncSubscriber * Add @seratch to CopyrightWaivers.txt * Fixes reactive-streams#333 by adding license headers to /examples/* * Adds a Glossary, Intent-sections and harmonizes verbiage * Clarifying that object equality is a.equals(b) in Intent for 2.12 * add license header to API directory * add license header to TCK * Fix missing cancel() from in tests that don't consume the entire source * Run with default TestEnvironment settings. * Update CopyrightWaivers.txt * =build reactive-streams#349 equal osgi manifest version as real version To have a tangible PR to talk about. Probably enough to resolve reactive-streams#349 Would be followed up with change to 1.0.1 eventually. * Add Javadoc explanation to the TCK test methods about what they do * Don't import org.reactivestreams.tck.TestEnvironment * Fix missing Javadoc tags * TCK: Request -1 in 309 instead of a random non-positive number * Remove the Random instance as well. * Keep the randomness. * Fixing typos in README.md * Minor rewording of 2.6 to make it easier to understand. (reactive-streams#342) * Minor rewording of 2.6 to make it easier to understand. * Fix spelling errors and clarify a couple of sentences * extra coordination * Remove vague statements, be more specific in others * Update javadoc based on ktoso's feedback * Use the wording eagery for error publisher test 104 * Address feedback, add links to the rules in the javadoc * SubscriberBlackboxVerificationRules explained * Non-BC for TCK: Corrects a typo in test method from *Compuatation to *Computation * Adding a glossary item for external synchronization * Repointing links to sources in README to current main release * =tck reactive-streams#362 signal onComplete in 201 blackbox verification * +tck reactive-streams#362 complete subscriber under test once done in 205 * +tck reactive-streams#362 wait for request signal in 209, and new additional tests * =tck check isCancelled in 205 blackbox; sample the state sometimes * =tck reactive-streams#362 blackbox 209 must issue onSubscribe before any other signal * Clarifies the meaning of "stochastic" for skipStochasticTests() * add additional test for optional_spec111. * now test verifies https://github.com/reactive-streams/reactive-streams-jvm#1.11 and https://github.com/reactive-streams/reactive-streams-jvm#1.5 for publishers, if they support multiple subscribers. * add delegate to IdentityProcessorVerification. * add tests for optional_spec111_registeredSubscribersMustReceiveOnNextOrOnCompleteSignals. * additional happy and the failure cases. * clear typos and change comments. * add new PublisherVerification for multi-subscribers tests. * removed onSubscribe constructor call. renamed Demand -> CancelableSubscription. * Change subscription remove logic. * add myself to CopyrightWaivers. * fix tests by using proxied subscriber, thanks Viktor for helping push this fix * Be consistent in reference style We use the `#.##` style in referring to rules everywhere, this one ref was using a different style - fixed that. * Switching to consistent use of apostrophe in spec * More apostrophe fixes * add patriknw to CopyrightWaivers * Version 1.0.1 * =spec reactive-streams#384 amend spec to allow not mentioning rule number in exception message * Update README.md * =tck reactive-streams#384 dont check for cause message when checking 3.9 * Updating versions to 1.0.1-RC2 and clarifying changes in RELEASE-NOTES.md * Fix links to "Terminal state" (reactive-streams#389) * Fix links to "Terminal state" * add angelsanz to CopyrightWaivers.txt * Preparing 1.0.1 (reactive-streams#390) * Bridge between Reactive-Streams and JDK 9 Flow API (reactive-streams#296) * Bridge between Reactive-Streams and JDK 9 Flow API * Apply changes based on ktoso's feedback * Use oraclejdk9, resolve build.gradle conflict * Change txt/code to use "Reactive Streams" as designator * NPE to use the updated parameter name. * Rename bridge class, tester class (+javadoc) * Java 9 Flow bridge: add Subscriber converters (reactive-streams#399) * Java 9 Flow bridge: add Subscriber converters * Fix return type javadoc * Example synchronous range Publisher (reactive-streams#395) * Example synchronous range Publisher * Udpated with rule numbers in comments * Mentioning rule 3.9 again in emit() * Move classes to the unicast package. * [WIP] TCK for j.u.c.Flow types "directly" (reactive-streams#398) * Add JDK9 TCK, using adapters * Fixing wrapping and unwrapping of the wrappers themselves. * Renames the converters to "toX" for RS and "toFlowX" for Flow. Fixes so that the dist url for gradle is http iso https (TravisCI bug?) Adds regression test for bridge converters. * fix formatting * cleanup
Not complete yet, travel and javaone intensely slowed me down at delivering this, though just need to cleanup and check things now...
See one or two classes commented about what style I propose here – simply to extend the existing impls and implement the adaptation in the
create...
methods, exposing newcreateFlow...
methods to be implemented instead.This will allow us to support the two TCKs without duplicating code, as well as we'll be pretty easily able to "swap" to the opposite mode if we ever need to.
Aims to resolve #388 (soon)