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

Empty multivalue expectations consume an onNext #650

Closed
simonbasle opened this issue Jun 2, 2017 · 0 comments
Closed

Empty multivalue expectations consume an onNext #650

simonbasle opened this issue Jun 2, 2017 · 0 comments
Assignees
Labels
area/reactor-test This belongs to the reactor-test module type/bug A general bug
Milestone

Comments

@simonbasle
Copy link
Member

From @simonbasle on April 11, 2017 14:10

When a multivalue expectation (expectNextCount or expectNextSequence) is effectively empty (count of 0 or empty iterable), it should be ignored. However, these expectations instead consume one onNext event.

For instance:

StepVerifier.create(Flux.just("foo", "bar"))
            .expectNextCount(0)
            .expectNext("foo", "bar")
            .expectComplete()
            .verify();

The test above should work but fails with message

expectation "expectNext(foo)" failed (expected value: foo; actual value: bar)

Copied from original issue: reactor/reactor-addons#101

@simonbasle simonbasle self-assigned this Jun 2, 2017
@simonbasle simonbasle added type/bug A general bug area/reactor-test This belongs to the reactor-test module labels Jun 2, 2017
@simonbasle simonbasle modified the milestone: 3.1.0.RELEASE Jun 2, 2017
IlyaZinkovich added a commit to IlyaZinkovich/reactor-core that referenced this issue Jun 15, 2017
IlyaZinkovich added a commit to IlyaZinkovich/reactor-core that referenced this issue Jun 15, 2017
IlyaZinkovich added a commit to IlyaZinkovich/reactor-core that referenced this issue Jun 15, 2017
IlyaZinkovich added a commit to IlyaZinkovich/reactor-core that referenced this issue Jun 15, 2017
IlyaZinkovich added a commit to IlyaZinkovich/reactor-core that referenced this issue Jul 12, 2017
Added logic to handle empty multivalue expectations
in DefaultStepVerifierBuilder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/reactor-test This belongs to the reactor-test module type/bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant