Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VirtualTime with Mono.delay hangs in reactor-core:3.7.1 #3970

Open
anuchandy opened this issue Jan 21, 2025 · 1 comment
Open

VirtualTime with Mono.delay hangs in reactor-core:3.7.1 #3970

anuchandy opened this issue Jan 21, 2025 · 1 comment
Labels
status/need-user-input This needs user input to proceed

Comments

@anuchandy
Copy link

anuchandy commented Jan 21, 2025

The following virtual time test functions correctly with reactor-core:3.4.41, but it hangs with version 3.7.1 (+ and reactor-test:3.7.1). During our upgrade to 3.7.1, we encountered this issue and are currently holding the upgrade. Reporting it in case this points to a potential regression in 3.7.1 itself, could you please take a look?

StepVerifier
    .withVirtualTime(() -> Mono.<Integer>delay(Duration.ofSeconds(5)), () -> VirtualTimeScheduler.create(), 0)
    .thenAwait(Duration.ofSeconds(30))
    .verifyErrorSatisfies(e -> {
    });

Note that with 3.7.1 if I change last argument (n) to 1 then it passes but still need to confirm that if this points to any regression in time related operators (Mono.delay/timeout etc.)

@chemicL
Copy link
Member

chemicL commented Jan 24, 2025

Hey, @anuchandy!

As far as I understand your test verifies that something has happened but without any request to the upstream (n = 0). Since reactor-core 3.5 the behaviour of Mono has changed in that it is now actually lazy - it only starts processing once it receives a demand, not at subscription time. It is well documented in the release notes and is not a regression in my view. Can you please consult the release notes and let us know whether I properly understood your intent? Thanks.

@chemicL chemicL added the status/need-user-input This needs user input to proceed label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-user-input This needs user input to proceed
Projects
None yet
Development

No branches or pull requests

2 participants