Skip to content

Commit 9c5e4cb

Browse files
committed
Use a range for expected logs
For some reason we get a different amount of logs on the different frameworks. It is usually 13, but sometimes 14, sometimes 16 Unsure really, but if we were still sending host logs we'd expect many more than 20, so seems fine
1 parent e35949b commit 9c5e4cb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tracer/test/Datadog.Trace.ClrProfiler.IntegrationTests/AzureFunctionsTests.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ public async Task SubmitsTraces()
301301

302302
// ~327 (ish) logs but we kill func.exe so some logs are lost
303303
// and since sometimes the batch of logs can be 100+ it can be a LOT of logs that we lose
304-
// so just check that we have more than the 13 that we get when host logs are disabled
304+
// so just check that we have much more than when we have host logs disabled
305305
logs.Should().HaveCountGreaterThanOrEqualTo(200);
306306
}
307307
}
@@ -347,7 +347,10 @@ public async Task SubmitsTraces()
347347

348348
var logs = logsIntake.Logs;
349349
// we expect some logs still from the worker process
350-
logs.Should().HaveCount(13);
350+
// this just seems flaky I THINK because of killing the func.exe process (even though we aren't using the host logs)
351+
// commonly see 13, 14, 15, 16 logs, but IF we were logging the host logs we'd see 300+
352+
logs.Should().HaveCountGreaterThan(10);
353+
logs.Should().HaveCountLessThanOrEqualTo(20);
351354
}
352355
}
353356
}

0 commit comments

Comments
 (0)