Skip to content

Commit cc6f665

Browse files
committed
WIP
1 parent f543f06 commit cc6f665

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

dd-smoke-tests/spring-boot-rabbit/src/test/java/datadog/smoketest/SpringBootRabbitSmokeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void roundtripsProduceFullAmqpTraceStructure() throws IOException {
129129
// per message plus each service's connection-setup/ack commands.
130130
List<TraceMatcher> expected = new ArrayList<>();
131131
for (int i = 0; i < MESSAGES.length; i++) {
132-
expected.add(roundTrip()); // one full round-trip trace per message => all are verified
132+
expected.add(roundTrip());
133133
}
134134
for (String service : new String[] {"spring-rabbit-0", "spring-rabbit-1"}) {
135135
for (String command : ADMIN_COMMANDS) {

dd-smoke-tests/src/main/java/datadog/smoketest/trace/TraceMatcher.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public final class TraceMatcher {
3636

3737
/** Configures {@link #trace(UnaryOperator, SpanMatcher...)} to sort spans by start time. */
3838
public static final UnaryOperator<Options> SORT_BY_START_TIME =
39-
options -> options.sorter(START_TIME_COMPARATOR);
39+
options -> options.sort(START_TIME_COMPARATOR);
4040

4141
/**
4242
* Configures {@link #trace(UnaryOperator, SpanMatcher...)} to order spans root→leaf by following
@@ -84,8 +84,8 @@ void assertTrace(List<DecodedSpan> spans, int traceIndex) {
8484
ordered = chainOrder(spans);
8585
} else {
8686
ordered = new ArrayList<>(spans);
87-
if (options.sorter != null) {
88-
ordered.sort(options.sorter);
87+
if (options.comparator != null) {
88+
ordered.sort(options.comparator);
8989
}
9090
}
9191
for (int i = 0; i < spanMatchers.length; i++) {
@@ -153,13 +153,12 @@ private static List<DecodedSpan> chainOrder(List<DecodedSpan> spans) {
153153
return ordered;
154154
}
155155

156-
/** Per-trace matching options. */
157156
public static final class Options {
158-
Comparator<DecodedSpan> sorter = null; // null => keep received order
157+
Comparator<DecodedSpan> comparator = null; // null => keep received order
159158
boolean linearizeByParentChain = false;
160159

161-
public Options sorter(Comparator<DecodedSpan> sorter) {
162-
this.sorter = sorter;
160+
public Options sort(Comparator<DecodedSpan> comparator) {
161+
this.comparator = comparator;
163162
return this;
164163
}
165164

0 commit comments

Comments
 (0)