Skip to content

Commit

Permalink
test: fix span_processor test failing with default features (#2782)
Browse files Browse the repository at this point in the history
  • Loading branch information
paullegranddc authored Mar 11, 2025
1 parent 68c9133 commit dac8bd5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions opentelemetry-sdk/src/trace/span_processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -971,15 +971,20 @@ mod tests {
.with_scheduled_delay(Duration::from_millis(10))
.with_max_queue_size(10);
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
let batch = batch.with_max_concurrent_exports(10);
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
let batch = batch.with_max_export_timeout(Duration::from_millis(10));
let batch = {
batch
.with_max_concurrent_exports(10)
.with_max_export_timeout(Duration::from_millis(10))
};
let batch = batch.build();
assert_eq!(batch.max_export_batch_size, 10);
assert_eq!(batch.scheduled_delay, Duration::from_millis(10));
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));
assert_eq!(batch.max_concurrent_exports, 10);
assert_eq!(batch.max_queue_size, 10);
#[cfg(feature = "experimental_trace_batch_span_processor_with_async_runtime")]
{
assert_eq!(batch.max_concurrent_exports, 10);
assert_eq!(batch.max_export_timeout, Duration::from_millis(10));
}
}

// Helper function to create a default test span
Expand Down

0 comments on commit dac8bd5

Please sign in to comment.