From 4a591545b2d5a36096875aacd3b5e4608875df9c Mon Sep 17 00:00:00 2001 From: Scott Gerring Date: Mon, 16 Dec 2024 19:36:32 +0100 Subject: [PATCH] test fixes --- .../tests/integration_test/tests/metrics.rs | 14 ++++++-------- scripts/integration_tests.sh | 4 ---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/opentelemetry-otlp/tests/integration_test/tests/metrics.rs b/opentelemetry-otlp/tests/integration_test/tests/metrics.rs index 68fc423ec5..5436a0ba9e 100644 --- a/opentelemetry-otlp/tests/integration_test/tests/metrics.rs +++ b/opentelemetry-otlp/tests/integration_test/tests/metrics.rs @@ -34,10 +34,9 @@ async fn init_metrics() -> SdkMeterProvider { .with_timeout(Duration::from_secs(1)) .build(); - let resource = Resource::new(vec![KeyValue::new( - opentelemetry_semantic_conventions::resource::SERVICE_NAME, - "metrics-integration-test", - )]); + let resource = Resource::builder_empty() + .with_service_name("metrics-integration-test") + .build(); let meter_provider = MeterProviderBuilder::default() .with_resource(resource) @@ -284,10 +283,9 @@ mod tests { .with_interval(Duration::from_millis(100)) .with_timeout(Duration::from_secs(1)) .build(); - let resource = Resource::new(vec![KeyValue::new( - opentelemetry_semantic_conventions::resource::SERVICE_NAME, - "metrics-integration-test", - )]); + let resource = Resource::builder_empty() + .with_service_name("metrics-integration-test") + .build(); let meter_provider = MeterProviderBuilder::default() .with_resource(resource) .with_reader(reader) diff --git a/scripts/integration_tests.sh b/scripts/integration_tests.sh index 54eb31c3b5..39fc870082 100755 --- a/scripts/integration_tests.sh +++ b/scripts/integration_tests.sh @@ -5,10 +5,6 @@ TEST_DIR="./opentelemetry-otlp/tests/integration_test/tests" if [ -d "$TEST_DIR" ]; then cd "$TEST_DIR" - # Debug - cargo tree - cat /home/runner/work/opentelemetry-rust/opentelemetry-rust/opentelemetry-sdk/src/resource/mod.rs - # Run tests with the grpc-tonic feature cargo test --no-default-features --features "tonic-client"