Giter Site home page Giter Site logo

schananas / practical-reactor Goto Github PK

View Code? Open in Web Editor NEW
338.0 338.0 629.0 1.73 MB

Practical Project Reactor and reactive programing workshop

License: MIT License

Java 100.00%
exercises java learning-by-doing learning-exercise practical-exercises project-reactor reactive-exercises reactive-programming reactive-streams reactor reactor-core reactor-exercises reactor-pattern workshop

practical-reactor's People

Contributors

0xc0d3d00d avatar amarakulin avatar hotsoupisgood avatar noemiandras avatar santimanuelr avatar schananas 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

practical-reactor's Issues

Your feedback

This is the place where you can post your feedback about exercises.

Are exercises too hard?
Are requirements clear enough?
How much time took you to finish all exercises?
Do you feel that your knowledge about Reactor improved after doing this workshop?
Any proposals for improvements or new exercises?

Can't pass exercise c4_LifecycleHooks need_to_cancel when upgrade reactor-core package.

I use the code below

        AtomicBoolean canceled = new AtomicBoolean(false);

        Flux<Integer> temperatureFlux = room_temperature_service()
                .doOnCancel(() -> canceled.set(true)) //todo: change this line only
                ;

        StepVerifier.create(temperatureFlux.take(0))
                    .expectNextCount(0)
                    .verifyComplete();

        Assertions.assertTrue(canceled.get());

The test case can pass when i use reactor-core:3.4.14.
But it can't pass when is use reactor-core:3.5.0-m2.
Is this a bug of reactor-core:3.5.0-m2 or has the behavior changed on eactor-core:3.5.0-m2?
I don't know how to fix it.

c3_Filtering_sequence - golden_middle test and solution is wrong

In the solution:

/**
  * `number_service()` returns 300 numbers, but you only need 100 numbers, from the middle.
  */
 @Test
 public void golden_middle() {
     Flux<Integer> numbers = number_service()
             .skip(100) //this should be .skip(150) as 300/2 = 150
             .take(100)
             ;

     StepVerifier.create(numbers)
                 .expectNextMatches(i -> i >= 100) // this should be expectNextMatches(i -> i >= 100), as the middle number is 150
                 .expectNextCount(99)
                 .verifyComplete();
 }

Parameter order is different.

Hi, thank you for the project.

In c4_LifecycleHooks line 78,

@Test
    public void atomic_counter() {
        AtomicInteger counter = new AtomicInteger(0);

       ...

        //I think wrong order.
        Assertions.assertEquals(counter.get(), 20);
    }

it change to

    Assertions.assertEquals(20, counter.get());

because 20 is expected value.

thank you.

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.