Coder Social home page Coder Social logo

lite-rx-api-hands-on's Introduction

Reactor Project

Join the chat at https://gitter.im/reactor/reactor

Download

Starting from 3.0, Reactor is now organized into multiple projects:

A set of compatible versions for all these projects is curated under a BOM ("Bill of Materials") hosted under this very repository.

Using the BOM with Maven

In Maven, you need to import the bom first:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-bom</artifactId>
            <version>2024.0.0-M1</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Notice we use the <dependencyManagement> section and the import scope.

Next, add your dependencies to the relevant reactor projects as usual, except without a <version>:

<dependencies>
    <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-core</artifactId>
    </dependency>
    <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-test</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>

Using the BOM with Gradle

Gradle 5.0+

Use the platform keyword to import the Maven BOM within the dependencies block, then add dependencies to your project without a version number.

dependencies {
     // import BOM
     implementation platform('io.projectreactor:reactor-bom:2024.0.0-M1')

     // add dependencies without a version number
     implementation 'io.projectreactor:reactor-core'
}

Gradle 4.x and earlier

Gradle versions prior to 5.0 have no core support for Maven BOMs, but you can use Spring's gradle-dependency-management plugin.

First, apply the plugin from Gradle Plugin Portal (check and change the version if a new one has been released):

plugins {
    id "io.spring.dependency-management" version "1.0.11.RELEASE"
}

Then use it to import the BOM:

dependencyManagement {
     imports {
          mavenBom "io.projectreactor:reactor-bom:2024.0.0-M1"
     }
}

Then add a dependency to your project without a version number:

dependencies {
     compile 'io.projectreactor:reactor-core'
}

BOM Versioning Scheme

The BOM can be imported in Maven, which will provide a set of default artifact versions to use whenever the corresponding dependency is added to a pom without an explicitly provided version.

As the different artifacts versions are not necessarily aligned, the BOM represents a release train with an heterogeneous range of versions that are curated to work together. The artifact version follows the YYYY.MINOR.MICRO-QUALIFIER scheme since Europium, where:

  • YYYY is the year of the first GA release in a given release cycle (like 3.4.0 for 3.4.x)
  • .MINOR is a 0-based number incrementing with each new release cycle ** in the case of the BOM it allows discerning between release cycles in case two get first released the same year
  • .PATCH is a 0-based number incrementing with each service release
  • -QUALIFIER is a textual qualifier, which is omitted in the case of GA releases (see below)

On top of the artifact version, each release train has an associated codename, a chemical name from the Periodic Table of Elements in growing alphabetical order, for reference in discussions.

So far, the release trains code names are:

  • Aluminium for the 3.0.x generation of Reactor-Core (πŸ’‘)
  • Bismuth for the 3.1.x generation (πŸ’‘)
  • Californium for the 3.2.x generation (πŸ’‘)
  • Dysprosium for the 3.3.x generation (πŸ’‘)
  • Europium (2020.0) for the 3.4.x generation (πŸ’‘)

NOTE: Up until Dysprosium, the BOM was versioned using a release train scheme with a codename followed by a qualifier, and the qualifiers were slightly different. For example: Aluminium-RELEASE (first GA release, would now be something like YYYY.0.0), Bismuth-M1, Californium-SR1 (service release would now be something like YYYY.0.1), Dysprosium-RC1, Dysprosium-BUILD-SNAPSHOT (after each patch, we'd go back to the same snapshot version. would now be something like YYYY.0.X-SNAPSHOT so we get 1 snapshot per PATCH).

Contributing, Community / Support

license

As hinted above, this repository is for hosting the BOM and for transverse issues only. Most of the time, if you're looking to open an issue or a PR, it should be done in a more specific repository corresponding to one of the actual artifacts.

All projects follow the same detailed contributing guidelines which you can find here.

This document also give some ways you can get answers to your questions.

Documentation

Detail of Projects

Reactor Core

Reactor Core

Reactive foundations for apps and frameworks and reactive extensions inspired API with Mono (1 element) and Flux (n elements) types

Reactor Netty

Reactor Netty

TCP and HTTP client and server.

Reactor Addons

Reactor Addons

Extra projects adding features to reactor:

Snapshot Artifacts

While Stable Releases are synchronized with Maven Central, fresh snapshot and milestone artifacts are provided in the repo.spring.io repositories.

To add this repo to your Maven build, add it to the <repositories> section like the following:

<repositories>
	<repository>
	    <id>spring-snapshot</id>
	    <name>Spring Snapshot Repository</name>
	    <url>https://repo.spring.io/snapshot</url>
	    <snapshots>
	        <enabled>true</enabled>
	    </snapshots>
	</repository>
</repositories>

To add it to your Gradle build, use the repositories configuration like this:

repositories {
	maven { url 'https://repo.spring.io/libs-snapshot' }
	mavenCentral()
}

You should then be able to import a -SNAPSHOT version of the BOM, like 2020.0.{NUMBER}-SNAPSHOT for the snapshot of the {NUMBER}th service release of 2020.0 (Europium).

Sponsored by VMware

lite-rx-api-hands-on's People

Contributors

aclement avatar aneveu avatar bclozel avatar chrosciu avatar dependabot[bot] avatar dmedinag avatar izeye avatar mohamedibrahim54 avatar paweusz avatar pyvesb avatar rohanmukesh avatar sdeleuze avatar simonbasle avatar smaldini avatar snicoll avatar thenanox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lite-rx-api-hands-on's Issues

In part03, expectElementsWithThenComplete

In my test code, I checked User with expectNext.
Like the following:

void expectSkylerJesseComplete(Flux<User> flux) {
		StepVerifier.create(flux).expectNext(new User("swhite", null, null),
				new User("jpinkman", null, null))
				.expectComplete().verify();
		//fail();
	}

But I got an error:

java.lang.AssertionError: expectation failed (failed running expectation on signal [onNext(Person{username='swhite', firstname='null', lastname='null'})] with [java.lang.NullPointerException]:
)

	at reactor.test.DefaultStepVerifierBuilder.failPrefix(DefaultStepVerifierBuilder.java:1679)
	at reactor.test.DefaultStepVerifierBuilder.fail(DefaultStepVerifierBuilder.java:1675)
	at reactor.test.DefaultStepVerifierBuilder$DefaultVerifySubscriber.onExpectation(DefaultStepVerifierBuilder.java:1017)
	at reactor.test.DefaultStepVerifierBuilder$DefaultVerifySubscriber.onNext(DefaultStepVerifierBuilder.java:764)
	at reactor.core.publisher.FluxArray$ArraySubscription.fastPath(FluxArray.java:164)
	at reactor.core.publisher.FluxArray$ArraySubscription.request(FluxArray.java:90)
	at reactor.test.DefaultStepVerifierBuilder$DefaultVerifySubscriber.onSubscribe(DefaultStepVerifierBuilder.java:781)
	at reactor.core.publisher.FluxArray.subscribe(FluxArray.java:55)
	at reactor.core.publisher.FluxArray.subscribe(FluxArray.java:61)
	at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:532)
	at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:508)
	at io.pivotal.literx.Part03StepVerifier.expectSkylerJesseComplete(Part03StepVerifier.java:74)
	at io.pivotal.literx.Part03StepVerifier.expectElementsWithThenComplete(Part03StepVerifier.java:66)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)

why expectNext("foo", "bar") in expect2ElementsThenError is alright?

Fast publisher slow subscriber solution isn't parallel

The solution for Part11-Blocking to Reactive solution does not really process the users in parallel. If the intent of the problem is to do the save operations in parallel, I believe this is what the code should look like:

Mono<Void> fluxToBlockingRepository(Flux<User> flux, BlockingRepository<User> repository) {
  return flux
    .parallel(8)
    .runOn(Schedulers.parallel())
    .doOnNext(repository::save)
    .sequential().then();
}

Or is the intent of the problem to just save users to the repository in a different thread from the main thread, without making it parallel? If so, why is Schedulers.parallel recommended over Schedulers.elastic?

Thank you!

Cannot build: Malformed POM .../pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<snapshots>true</...

When I try to build this project using the provided ./mvnw script, I receive the following error:

$ ./mvnw package
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Malformed POM <blah>/lite-rx-api-hands-on/pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<snapshots>true</... @66:21)  @ <blah>/lite-rx-api-hands-on/pom.xml, line 66, column 21
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project io.pivotal:lite-rx-api-hands-on:1.0.0-SNAPSHOT (<blah>/lite-rx-api-hands-on/pom.xml) has 1 error
[ERROR]     Malformed POM <blah>/lite-rx-api-hands-on/pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<snapshots>true</... @66:21)  @ <blah>/lite-rx-api-hands-on/pom.xml, line 66, column 21 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

Any idea what could be causing this?

Add Part00TestSubscriber

Should be nice to have some exercise to learn how to use TestSubscriberwith some provided Flux and Mono.

Add open source license

Documentation Issue

This repository does not have any open source license attached

Improvement Suggestion

Add a LICENSE file with an appropriate license, e.g. Apache-2.0 since that is used in the reactor-core project

Great exercises!

This is not an issue, just a "thank you" for making these exercises available.

I came across them when trying to familiarise myself with reactor-kafka, and I must say I thoroughly enjoyed doing these foundation exercises. I love the Breaking Bad theme, by the way :)

Thanks again, and keep up the good work!

Avoid platform-dependent line separator in part 06 assertions

In Part06Request there are two tests that assert multiple lines of logs as a single String.
The expected String in these assertions thus includes line separators, which happen to be platform dependent (explicit "\n" included).

The tests should be rewritten to avoid that, and the best way of doing so is to assert the logs as a List<String> (one per line) instead of a multi-line single String.

In the case of experimentWithLog():

  • split the stream's input on System.lineSeparator() rather than \n
  • don't join the filtered stream but collect to Collectors.toList(), thus turning the log variable into a List<String>
  • assert the list containsExactly each line of log (multiple strings without a \n)

In the case of experimentWithDoOn():

  • assert a splitted logConsole.toString(), on System.lineSeparator(), rather than a single unsplitted String`
  • assert it containsExactly 6 strings (one per line, without referring to the \n)

This change can be made on master and will be easily forward-merged to solution and techio_course, although it should be tested on solution locally.

Test for Mono.never() is ineffective

lite-rx-api-hands-on/src/test/java/io/pivotal/literx/Part02MonoTest.java
includes the test method below which passes even with my change so is ineffective.
Should the test be changed to register a doOnNext(fail())? Should StepVerifier have a better way of checking nothing produced from the Flux/Mono for a period?

@Test
	public void noSignal() {
		//Mono<String> mono = workshop.monoWithNoSignal();
                 Mono<String> mono = Mono.just("ShouldFail");
		StepVerifier
				.create(mono)
				.expectSubscription()
				.expectNoEvent(Duration.ofSeconds(1))
				.thenCancel()
				.verify();
	}  

Part07 Error#betterCallSaulForBogusMono() better with onErrorReturn

Hi, I am learning reactor on tech.io. In the first test case, it prompts me to use onErrorReturn(), but solution branch uses onErrorResume(). Both methods are correct, i think it is better to use onErrorReturn() in this case.

In solution branch

Mono<User> betterCallSaulForBogusMono(Mono<User> mono) {
    return mono.onErrorResume(e -> Mono.just(User.SAUL)); // TO BE REMOVED
}

My solution

Mono<User> betterCallSaulForBogusMono(Mono<User> mono) {
    return mono.onErrorReturn(User.SAUL);
}

NCDFE: org/junit/runner/notification/RunListener on https://tech.io/playgrounds/929/reactive-programming-with-reactor-3

Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener
while using https://tech.io/playgrounds/929/reactive-programming-with-reactor-3/Flux

Expected Behavior

I would like to be able to play with https://tech.io/playgrounds/929/reactive-programming-with-reactor-3/

Actual Behavior

while submitting "Run" on any button of https://tech.io/playgrounds/929/reactive-programming-with-reactor-3/Flux a NCDFE "org/junit/runner/notification/RunListener " this make the tutorial almost unusable.

Steps to Reproduce

https://tech.io/playgrounds/929/reactive-programming-with-reactor-3/Flux and click on any "Run" button

Possible Solution

I suspect the runner https://github.com/TechDotIO/java-maven3-junit4-runner is used for this project but junit 4 class doesn't exists anymore on https://github.com/reactor/lite-rx-api-hands-on/tree/techio_course this lead to the NCDFE

I suspect this is due to #71

Possible solutions :

  • add junit4 jar as a dependency of the project
  • revert the PR on the "techio_course" branch.
  • provide a java-maven3-junit4-runner to https://github.com/TechDotIO

Could not find the artifact `reactor-bom:pom:Bismuth-BUILD-SNAPSHOT`

Hi,

With the change in pom.xml on f8f68da, build fails since it can not find the artifact io.projectreactor:reactor-bom:pom:Bismuth-BUILD-SNAPSHOT.

Builds successfully when I revert the previous version of pom.xml.

[INFO] Scanning for projects...
Downloading: https://repo.spring.io/milestone/io/projectreactor/reactor-bom/Bismuth-BUILD-SNAPSHOT/maven-metadata.xml
Downloading: https://repo.spring.io/milestone/io/projectreactor/reactor-bom/Bismuth-BUILD-SNAPSHOT/reactor-bom-Bismuth-BUILD-SNAPSHOT.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Non-resolvable import POM: Could not find artifact io.projectreactor:reactor-bom:pom:Bismuth-BUILD-SNAPSHOT in spring-milestones (https://repo.spring.io/milestone) @ line 92, column 16
[ERROR] 'dependencies.dependency.version' for io.projectreactor:reactor-core:jar is missing. @ line 35, column 15
[ERROR] 'dependencies.dependency.version' for io.projectreactor:reactor-test:jar is missing. @ line 39, column 15
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project io.pivotal:lite-rx-api-hands-on:1.1.0-SNAPSHOT (/home/sedat/Desktop/code/lite-rx-api-hands-on/pom.xml) has 3 errors
[ERROR] Non-resolvable import POM: Could not find artifact io.projectreactor:reactor-bom:pom:Bismuth-BUILD-SNAPSHOT in spring-milestones (https://repo.spring.io/milestone) @ line 92, column 16 -> [Help 2]
[ERROR] 'dependencies.dependency.version' for io.projectreactor:reactor-core:jar is missing. @ line 35, column 15
[ERROR] 'dependencies.dependency.version' for io.projectreactor:reactor-test:jar is missing. @ line 39, column 15
[ERROR]

Add `Flux.collect...()` method exercise

Motivation

As currently there's no exercise for Flux.collect...() methods I thought that at least one case could be helpful.

Desired solution

I'd like to add method testing Flux.collectList():

	// TODO Convert the input Flux<User> to a Mono<List<User>> containing list of collected flux values
	Mono<List<User>> fluxCollection(Flux<User> flux) {
		return flux.collectList(); // TO BE REMOVED
	}

to Part08OtherOperations class.

Considered alternatives

Adding entire family of Flux.collect...() methods would be probably overkill.
One should be enough to signal existence of those.

Reactor 3.0.6 update

An update to Reactor 3.0.6 apparently breaks Part 11.

It seems the choice of the parallel scheduler is not the right one, since it's designed for CPU-bound tasks. In that case , an elastic Scheduler (for blocking) operations is a better choice.

Part06Request fluxWithDoOnPrintln failing due to logger

Expected Behavior

Below fluxWithDoOnPrintln implementation is failing due to a logger statement. The logger is appending the below line to the console.

DEBUG reactor.util.Loggers$LoggerFactory - Using Slf4j logging framework

Flux<User> fluxWithDoOnPrintln() {
	return repository.findAll().doOnSubscribe(a -> System.out.println("Starring:"))
			.doOnNext(user -> System.out.println(String.format("%s %s", user.getFirstname(), user.getLastname())))
			.doOnComplete(() -> System.out.println("The end!")); //TODO: Disable logger
}

Logs:

org.opentest4j.AssertionFailedError: 
Expecting:
 <"21:18:16.820 [main] DEBUG reactor.util.Loggers$LoggerFactory - Using Slf4j logging framework
Starring:
Skyler White
Jesse Pinkman
Walter White
Saul Goodman
The end!
">
to be equal to:
 <"Starring:
Skyler White
Jesse Pinkman
Walter White
Saul Goodman
The end!
">

many unit test fails on jdk 11

for example, io.pivotal.literx.Part01FluxTest#fromValues

C:\j\bin\java.exe -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3\lib\idea_rt.jar=49217:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\yang.lei.m2\repository\org\junit\platform\junit-platform-launcher\1.6.1\junit-platform-launcher-1.6.1.jar;C:\Users\yang.lei.m2\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\Users\yang.lei.m2\repository\org\junit\platform\junit-platform-engine\1.6.1\junit-platform-engine-1.6.1.jar;C:\Users\yang.lei.m2\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\Users\yang.lei.m2\repository\org\junit\platform\junit-platform-commons\1.6.1\junit-platform-commons-1.6.1.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3\plugins\junit\lib\junit5-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.2.3\plugins\junit\lib\junit-rt.jar;C:\G\lite-rx-api-hands-on\target\test-classes;C:\G\lite-rx-api-hands-on\target\classes;C:\M\repository\io\projectreactor\reactor-core\3.3.4.RELEASE\reactor-core-3.3.4.RELEASE.jar;C:\M\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;C:\M\repository\io\projectreactor\reactor-test\3.3.4.RELEASE\reactor-test-3.3.4.RELEASE.jar;C:\M\repository\ch\qos\logback\logback-classic\1.1.3\logback-classic-1.1.3.jar;C:\M\repository\ch\qos\logback\logback-core\1.1.3\logback-core-1.1.3.jar;C:\M\repository\org\slf4j\slf4j-api\1.7.7\slf4j-api-1.7.7.jar;C:\M\repository\org\junit\jupiter\junit-jupiter\5.6.1\junit-jupiter-5.6.1.jar;C:\M\repository\org\junit\jupiter\junit-jupiter-api\5.6.1\junit-jupiter-api-5.6.1.jar;C:\M\repository\org\apiguardian\apiguardian-api\1.1.0\apiguardian-api-1.1.0.jar;C:\M\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;C:\M\repository\org\junit\platform\junit-platform-commons\1.6.1\junit-platform-commons-1.6.1.jar;C:\M\repository\org\junit\jupiter\junit-jupiter-params\5.6.1\junit-jupiter-params-5.6.1.jar;C:\M\repository\org\junit\jupiter\junit-jupiter-engine\5.6.1\junit-jupiter-engine-5.6.1.jar;C:\M\repository\org\junit\platform\junit-platform-engine\1.6.1\junit-platform-engine-1.6.1.jar;C:\M\repository\io\reactivex\rxjava3\rxjava\3.0.1\rxjava-3.0.1.jar;C:\M\repository\org\assertj\assertj-core\3.15.0\assertj-core-3.15.0.jar" com.intellij.rt.junit.JUnitStarter -ideVersion5 -junit5 io.pivotal.literx.Part01FluxTest,fromValues

java.lang.NullPointerException
at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.toVerifierAndSubscribe(DefaultStepVerifierBuilder.java:867)
at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:823)
at reactor.test.DefaultStepVerifierBuilder$DefaultStepVerifier.verify(DefaultStepVerifierBuilder.java:815)
at reactor.test.DefaultStepVerifierBuilder.verifyComplete(DefaultStepVerifierBuilder.java:682)
at io.pivotal.literx.Part01FluxTest.fromValues(Part01FluxTest.java:34)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:686)
at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131)
at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:149)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestableMethod(TimeoutExtension.java:140)
at org.junit.jupiter.engine.extension.TimeoutExtension.interceptTestMethod(TimeoutExtension.java:84)
at org.junit.jupiter.engine.execution.ExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(ExecutableInvoker.java:115)
at org.junit.jupiter.engine.execution.ExecutableInvoker.lambda$invoke$0(ExecutableInvoker.java:105)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45)
at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:104)
at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:98)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:212)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:208)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:137)
at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:71)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:135)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:248)
at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$5(DefaultLauncher.java:211)
at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:226)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:199)
at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:132)
at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

Process finished with exit code -1

Is there a place to discuss solutions?

First of all thanks for this small project.
Nice idea to let people play with the api.

So for me in Part01 I implemented the simple tests ('empty', 'fromList', 'error', ... ). But 'countEachSecond' and 'neverTerminates' don't work with my implementation. Maybe I did not understand what I really have to implement, but in the end the Tests did not end with any result ('neverTerminates' become true in this case ;-), but I don't think that's what you had in mind). I would expect a 'fail' here.

Is there a place to discuss the solutions? Or do you plan more blog-posts for doing that?

Regards
JΓΆrg

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.