Skip to content

Commit dac8bd5

Browse files
test: fix span_processor test failing with default features (#2782)
1 parent 68c9133 commit dac8bd5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

opentelemetry-sdk/src/trace/span_processor.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,15 +971,20 @@ mod tests {
971971
.with_scheduled_delay(Duration::from_millis(10))
972972
.with_max_queue_size(10);
973973
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
974-
let batch = batch.with_max_concurrent_exports(10);
975-
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
976-
let batch = batch.with_max_export_timeout(Duration::from_millis(10));
974+
let batch = {
975+
batch
976+
.with_max_concurrent_exports(10)
977+
.with_max_export_timeout(Duration::from_millis(10))
978+
};
977979
let batch = batch.build();
978980
assert_eq!(batch.max_export_batch_size, 10);
979981
assert_eq!(batch.scheduled_delay, Duration::from_millis(10));
980-
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));
981-
assert_eq!(batch.max_concurrent_exports, 10);
982982
assert_eq!(batch.max_queue_size, 10);
983+
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
984+
{
985+
assert_eq!(batch.max_concurrent_exports, 10);
986+
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));
987+
}
983988
}
984989

985990
// Helper function to create a default test span

0 commit comments

Comments
 (0)