Extend JUnitSuite to make sure the test is included in the report. After merging this, nothing would happen. We should then invoke `checkTestsHaveRun` from the jenkins nightly builds. That should then fail the build until we merge #28347 and switch the nightly builds to run on JDK11.
47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
/*
|
|
* Copyright (C) 2017-2019 Lightbend Inc. <https://www.lightbend.com>
|
|
*/
|
|
|
|
package akka.stream.javadsl;
|
|
|
|
import akka.NotUsed;
|
|
import akka.japi.Pair;
|
|
import org.junit.Test;
|
|
|
|
import java.util.concurrent.Flow;
|
|
|
|
import org.scalatest.junit.JUnitSuite;
|
|
|
|
public class JavaFlowSupportCompileTest extends JUnitSuite {
|
|
@Test
|
|
public void shouldCompile() throws Exception {
|
|
final Flow.Processor<String,String> processor = new Flow.Processor<String, String>() {
|
|
@Override
|
|
public void subscribe(Flow.Subscriber<? super String> subscriber) {}
|
|
@Override
|
|
public void onSubscribe(Flow.Subscription subscription) {}
|
|
@Override
|
|
public void onNext(String item) {}
|
|
@Override
|
|
public void onError(Throwable throwable) {}
|
|
@Override
|
|
public void onComplete() {}
|
|
};
|
|
|
|
|
|
final Source<String, Flow.Subscriber<String>> stringSubscriberSource =
|
|
JavaFlowSupport.Source.asSubscriber();
|
|
final Source<String, NotUsed> stringNotUsedSource =
|
|
JavaFlowSupport.Source.fromPublisher(processor);
|
|
|
|
final akka.stream.javadsl.Flow<String, String, NotUsed> stringStringNotUsedFlow =
|
|
JavaFlowSupport.Flow.fromProcessor(() -> processor);
|
|
final akka.stream.javadsl.Flow<String, String, NotUsed> stringStringNotUsedFlow1 =
|
|
JavaFlowSupport.Flow.fromProcessorMat(() -> Pair.apply(processor, NotUsed.getInstance()));
|
|
|
|
final Sink<String, Flow.Publisher<String>> stringPublisherSink =
|
|
JavaFlowSupport.Sink.asPublisher(AsPublisher.WITH_FANOUT);
|
|
final Sink<String, NotUsed> stringNotUsedSink =
|
|
JavaFlowSupport.Sink.fromSubscriber(processor);
|
|
}
|
|
}
|