We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

charlie feng • 4 years ago

Thanks for the effort.
And could you provide the link to answer? just stucked on some questions

Han Wang • 3 years ago

Don't tryna be a smart-ass but here is my git repo with all the solutions:
Java: https://github.com/austinwa...
Kotlin: https://github.com/austinwa...

Anonymous • 4 years ago
Alexander Glukhovtsev • 6 years ago

For the last part ( Blocking to Reactive )
one can use almost exact snippets from here

Peter • 3 years ago

Does not work anymore?

Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/runner/notification/RunListener
at com.codingame.codemachine.runner.junit.JUnitTestListRunner.main(JUnitTestListRunner.java:5)
Caused by: java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener

Anonymous • 3 years ago

Same error here.. Not able to see any code

randy montana • 5 years ago

Thanks for putting this together. Would definitely be nice to have some hints or solutions since it's easy to get stuck for a little while on small stuff. But overall can appreciate the time taken to provide this.

GreenGO • 4 years ago

Say to capitalize, but assert for upper case

Mashrur Mia • 6 years ago

typo "in fact it can be though -> thought of as both a Subscriber to the operator upstream and a Publisher for downstream"

siddharth • 5 years ago

What hapen when the we subscriber request limited amount of data from publisher . for ex- request 10
then again subscriber requested 20 data form publisher..what will happen .
and mind it subscriber subscribe to publisher withe the limited request not with the Long.Max_Value .as per doc in the scenario

PaulOliverHorvath • 4 months ago

I guess all tests pass if you forget to use verify :( at least the expect3600Elements did, thanks to my intuition to make the test fail first. :D

Samuel Dominguez • 2 years ago

this is really awesome, thank you!

EMMANUEL ORAIN • 2 years ago

Is anything supposed to happen when you click on the Run button ? (besides "Waiting" for a few seconds , and then the button reurning to its initial state)

[CG]Thibaud • 2 years ago

It's possible there has been a temporary issue with the playgrounds. It seems to be working now.

Anonymous • 3 years ago

Why I cannnot see any sample code..

psk • 3 years ago

any idea wy i am unable to import the org.junit packages
can seem to run the test cases

aimynona • 3 years ago

I have the same problem :-( Does anybody know?

Roger Pack • 3 years ago

I get an NPE clicking the "run this" button...

Anonymous • 4 years ago

After Click Run button, where to see the results of each test case?

shr • 4 years ago

void expectFooBarError(Flux<string> flux) { StepVerifier.create(flux).expectNext("foo").expectNext("bar").verifyError(RuntimeException.class);

shr • 4 years ago

void expectFooBarComplete(Flux<string> flux) {

Dovi • 4 years ago

I love the Breaking Bad theme :D

Guest • 4 years ago
John • 3 years ago

The field in User class is username so getUsername is correct.

Nevyn • 4 years ago

Looking at the last problem on part 4 my expectation is that the supplier argument should be used. This is either not the case or I just don't know how to use it properly.

Maybe add some more information on what the expectation is in regards to the source of the data.

sbilello • 4 years ago

When you complete all of them are you going to receive a badge or achievement?

Aashish • 6 years ago

Is it a good idea to have pubisher and subscriber in the same app / Microservice and use Reactive-RabbitMq as reactive stream?

Mahantesh Ambali • 6 years ago

What is the answer for the last one. ? Unable to find. expect3600Elements

Raúl Montemayor Peralta • 5 years ago

Flux<long> counter() {
Duration period = Duration.of(100L, ChronoUnit.MILLIS);
return Flux.interval(period).take(10L);

Catio • 4 years ago

void expect3600Elements(Supplier<flux<long>> supplier) {

kojot • 4 years ago

void expect3600Elements(Supplier<flux<long>> supplier) {
final Duration duration = StepVerifier
.withVirtualTime(() -> Mono.delay(Duration.ofHours(1)))

This works to me, but I don't know why. I think it should by `.expectNextCount(3600)` or something like that.

Magdalena • 5 years ago

Flux<long> counter() {
return Flux.interval(Duration.ofMillis(100)).take(10);

Ankesh Kapil • 6 years ago

Flux<long> counter() {

return Flux.generate(() -> 0l, (state, sink) -> {
if (state == 10l)
return state;

Alexander Glukhovtsev • 6 years ago

It is nice that
one can add

import static org.assertj.core.api.Assertions.*;


import static org.junit.Assert.*;

to this snippet
and this will work just fine .

[CG]OlogN • 6 years ago

Hi Alexander, do you think you can send your pull requests on the GitHub project? https://github.com/reactor/...

Alexander Glukhovtsev • 6 years ago

I don't know .
Sometimes incomplete or slightly incorrect information
pushes your to discover what is actually goes on .
So, in this particular case it was beneficial, for me .
And I'm inclined to leave this part of the tutorial as it is
( more challenging ) .

Alexander Glukhovtsev • 6 years ago

Also clever typo in withVirtualTime()method's name example,
I spend almost half an hour, reading error messages,
until I figured that out .
And it was a surprise, for me,
that java.util.function.Supplier is lambda itself .
the method signature (void|:Unit|side effects) ->|=>|to Flux<T>
is equivalent to java.util.function.Supplier<Flux<T>>