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

Migrate rxjava3 unit tests to Java #7924

Merged
merged 5 commits into from
Apr 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

import com.google.common.primitives.Ints;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.instrumentation.testing.junit.InstrumentationExtension;
import io.opentelemetry.sdk.testing.assertj.TraceAssert;
Expand Down Expand Up @@ -116,22 +115,6 @@ void basicFlux() {
span -> span.hasName("add one").hasParent(trace.getSpan(0))));
}

@Test
void basicFluxIterable() {
List<Integer> result =
testing.runWithSpan(
"parent",
() -> Flux.fromIterable(Ints.asList(5, 6)).map(this::addOne).collectList().block());
assertThat(result).containsExactly(6, 7);

testing.waitAndAssertTraces(
trace ->
trace.hasSpansSatisfyingExactly(
span -> span.hasName("parent").hasNoParent(),
span -> span.hasName("add one").hasParent(trace.getSpan(0)),
span -> span.hasName("add one").hasParent(trace.getSpan(0))));
}

@Test
void twoOperationsFlux() {
List<Integer> result =
Expand Down
Loading