Skip to content

compiler warning using Java Testkit DSL when who have 2 expectNext calls #2625

@pjfanning

Description

@pjfanning

This is just one example (below). We have a lot of these warnings.

[warn] /code/pekko/stream-tests/src/test/java/org/apache/pekko/stream/javadsl/SourceTest.java:1907:20: unchecked call to expectNext(I) as a member of the raw type org.apache.pekko.stream.testkit.TestSubscriber.ManualProbe
[warn] Source.from(Arrays.asList(1, 2))
[warn]         .map(
[warn]             elem -> {
[warn]               if (elem == 2) {
[warn]                 throw new IllegalArgumentException("Boom");
[warn]               } else {
[warn]                 return elem;
[warn]               }
[warn]             })
[warn]         .onErrorResume(ex -> ex.getMessage().contains("Boom"), e -> Source.single(0))
[warn]         .runWith(TestSink.create(system), system)
[warn]         .request(2)
[warn]         .expectNext(1)
[warn]         .expectNext(0)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions