Skip to content

Commit a80dc0c

Browse files
authored
test: Improve OTLP Builder test (#2817)
1 parent 233d11a commit a80dc0c

File tree

1 file changed

+12
-6
lines changed
  • opentelemetry-otlp/src/exporter

1 file changed

+12
-6
lines changed

opentelemetry-otlp/src/exporter/mod.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ mod tests {
342342
#[cfg(feature = "logs")]
343343
#[cfg(any(feature = "http-proto", feature = "http-json"))]
344344
#[test]
345+
#[ignore = "Unstable due to interference from env variable tests. Re-enable after https://github.com/open-telemetry/opentelemetry-rust/issues/2818 is resolved."]
345346
fn export_builder_error_invalid_http_endpoint() {
346347
use std::time::Duration;
347348

@@ -358,15 +359,20 @@ mod tests {
358359
.with_export_config(ex_config)
359360
.build();
360361

361-
assert!(matches!(
362-
exporter_result,
363-
Err(crate::exporter::ExporterBuildError::InvalidUri(_, _))
364-
));
362+
assert!(
363+
matches!(
364+
exporter_result,
365+
Err(crate::exporter::ExporterBuildError::InvalidUri(_, _))
366+
),
367+
"Expected InvalidUri error, but got {:?}",
368+
exporter_result
369+
);
365370
}
366371

367372
#[cfg(feature = "grpc-tonic")]
368-
#[test]
369-
fn export_builder_error_invalid_grpc_endpoint() {
373+
#[tokio::test]
374+
#[ignore = "Unstable due to interference from env variable tests. Re-enable after https://github.com/open-telemetry/opentelemetry-rust/issues/2818 is resolved."]
375+
async fn export_builder_error_invalid_grpc_endpoint() {
370376
use std::time::Duration;
371377

372378
use crate::{ExportConfig, LogExporter, Protocol, WithExportConfig};

0 commit comments

Comments
 (0)