From 04be759da4da6312a2a1f38f7c69b9d744d0a12e Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Mon, 12 Dec 2022 11:10:30 +0100 Subject: [PATCH] sort spans by start time (parents before children as tiebreaker) to avoid common causes for flaky tests --- .../main/java/io/opentelemetry/sdk/testing/trace/TraceUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/trace/TraceUtil.java b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/trace/TraceUtil.java index ca177192d83..72c9e55c57d 100644 --- a/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/trace/TraceUtil.java +++ b/sdk/testing/src/main/java/io/opentelemetry/sdk/testing/trace/TraceUtil.java @@ -10,7 +10,7 @@ public class TraceUtil { - /** compares spans by start time, and parent-child as a tie breaker (parent first) */ + /** Compare spans by start time, placing parents before their children as a tiebreaker. */ public static final Comparator SPAN_DATA_COMPARATOR = Comparator.comparing(SpanData::getStartEpochNanos) .thenComparing(