Fix flaky test (#1623)

This commit is contained in:
Trask Stalnaker 2024-12-24 10:27:18 -08:00 committed by GitHub
parent b600c74e85
commit 0d775871f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -243,9 +243,11 @@ class ConsistentReservoirSamplingSpanProcessorTest {
@Test
void ignoresNullSpans() {
SpanExporter mockSpanExporter = mock(SpanExporter.class);
when(mockSpanExporter.shutdown()).thenReturn(CompletableResultCode.ofSuccess());
SpanProcessor processor =
ConsistentReservoirSamplingSpanProcessor.create(
mock(SpanExporter.class), RESERVOIR_SIZE, EXPORT_PERIOD_100_MILLIS_AS_NANOS);
mockSpanExporter, RESERVOIR_SIZE, EXPORT_PERIOD_100_MILLIS_AS_NANOS);
assertThatCode(
() -> {
processor.onStart(null, null);