use of reactor.core.publisher.FluxOnAssembly.AssemblySnapshot in project reactor-core by reactor.
the class MonoCallableOnAssemblyTest method scanOperator.
@Test
public void scanOperator() {
AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
Mono<Object> source = Mono.empty();
MonoCallableOnAssembly<?> test = new MonoCallableOnAssembly<>(source, stacktrace);
assertThat(test.scan(Scannable.Attr.ACTUAL_METADATA)).isTrue();
assertThat(test.scan(Scannable.Attr.PARENT)).isSameAs(source);
assertThat(test.scan(Scannable.Attr.PREFETCH)).isEqualTo(Integer.MAX_VALUE);
assertThat(test.scan(Scannable.Attr.RUN_STYLE)).isSameAs(Scannable.Attr.RunStyle.SYNC);
}
use of reactor.core.publisher.FluxOnAssembly.AssemblySnapshot in project reactor-core by reactor.
the class ConnectableFluxOnAssemblyTest method stepNameAndToString.
@Test
public void stepNameAndToString() {
AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
ConnectableFluxOnAssembly<?> test = new ConnectableFluxOnAssembly<>(Flux.empty().publish(), stacktrace);
assertThat(test.toString()).isEqualTo(test.stepName()).startsWith("reactor.core.publisher.ConnectableFluxOnAssemblyTest.stepNameAndToString(ConnectableFluxOnAssemblyTest.java:");
}
use of reactor.core.publisher.FluxOnAssembly.AssemblySnapshot in project reactor-core by reactor.
the class MonoOnAssemblyTest method stepNameAndToString.
@Test
public void stepNameAndToString() {
AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
MonoOnAssembly<?> test = new MonoOnAssembly<>(Mono.empty(), stacktrace);
assertThat(test.toString()).isEqualTo(test.stepName()).startsWith("reactor.core.publisher.MonoOnAssemblyTest.stepNameAndToString(MonoOnAssemblyTest.java:");
}
use of reactor.core.publisher.FluxOnAssembly.AssemblySnapshot in project reactor-core by reactor.
the class MonoOnAssemblyTest method scanOperator.
@Test
public void scanOperator() {
AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
MonoOnAssembly<?> test = new MonoOnAssembly<>(Mono.empty(), stacktrace);
assertThat(test.scan(Scannable.Attr.ACTUAL_METADATA)).as("ACTUAL_METADATA").isTrue();
assertThat(test.scan(Scannable.Attr.RUN_STYLE)).isSameAs(Scannable.Attr.RunStyle.SYNC);
}
use of reactor.core.publisher.FluxOnAssembly.AssemblySnapshot in project reactor-core by reactor.
the class ParallelFluxOnAssemblyTest method parallelism.
@Test
public void parallelism() {
ParallelFlux<Integer> source = Flux.range(1, 4).parallel(3);
AssemblySnapshot stacktrace = new AssemblySnapshot(null, Traces.callSiteSupplierFactory.get());
ParallelFluxOnAssembly<Integer> test = new ParallelFluxOnAssembly<>(source, stacktrace);
assertThat(test.parallelism()).isEqualTo(3).isEqualTo(source.parallelism());
}
Aggregations