From 40e1bc053ace837f62152dce334a18221eff1e34 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Wed, 13 Nov 2024 09:47:07 +0100 Subject: [PATCH] Polishing. Leniently check expected number of spans. See #1528 --- .../cassandra/observability/ImperativeIntegrationTests.java | 2 +- .../data/cassandra/observability/ReactiveIntegrationTests.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ImperativeIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ImperativeIntegrationTests.java index 92c9ae495..e5290ec68 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ImperativeIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ImperativeIntegrationTests.java @@ -78,7 +78,7 @@ public SampleTestRunnerConsumer yourCode() { System.out.println(((SimpleMeterRegistry) meterRegistry).getMetersAsString()); - assertThat(tracer.getFinishedSpans()).hasSize(6); + assertThat(tracer.getFinishedSpans()).hasSizeGreaterThanOrEqualTo(5); for (FinishedSpan finishedSpan : tracer.getFinishedSpans()) { diff --git a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ReactiveIntegrationTests.java b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ReactiveIntegrationTests.java index 9ec73ac40..631ae5262 100644 --- a/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ReactiveIntegrationTests.java +++ b/spring-data-cassandra/src/test/java/org/springframework/data/cassandra/observability/ReactiveIntegrationTests.java @@ -90,7 +90,7 @@ public SampleTestRunnerConsumer yourCode() { System.out.println(((SimpleMeterRegistry) meterRegistry).getMetersAsString()); - assertThat(tracer.getFinishedSpans()).hasSizeGreaterThanOrEqualTo(6); + assertThat(tracer.getFinishedSpans()).hasSizeGreaterThanOrEqualTo(5); }; } }