diff --git a/test/Datadog.Trace.ClrProfiler.IntegrationTests/WebRequestTests.cs b/test/Datadog.Trace.ClrProfiler.IntegrationTests/WebRequestTests.cs index 05a701207e14..7955e9196e2a 100644 --- a/test/Datadog.Trace.ClrProfiler.IntegrationTests/WebRequestTests.cs +++ b/test/Datadog.Trace.ClrProfiler.IntegrationTests/WebRequestTests.cs @@ -53,7 +53,7 @@ public void SubmitsTraces(bool enableCallTarget) { Assert.True(processResult.ExitCode >= 0, $"Process exited with code {processResult.ExitCode}"); - var spans = agent.WaitForSpans(expectedSpanCount, operationName: expectedOperationName); + var spans = agent.WaitForSpans(expectedSpanCount, operationName: expectedOperationName).OrderBy(s => s.Start); spans.Should().HaveCount(expectedSpanCount); foreach (var span in spans)