Skip to content

Commit 4783b64

Browse files
authored
Assert explicitly that shutdown succeeded in Integration tests (#2605)
1 parent 4cdc64f commit 4783b64

File tree

1 file changed

+6
-3
lines changed
  • opentelemetry-otlp/tests/integration_test/tests

1 file changed

+6
-3
lines changed

opentelemetry-otlp/tests/integration_test/tests/metrics.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ mod metrictests {
6969
);
7070

7171
// In tokio::current_thread flavor, shutdown must be done in a separate thread
72-
let _res = Handle::current()
72+
let shutdown_resut = Handle::current()
7373
.spawn_blocking(move || meter_provider.shutdown())
7474
.await
7575
.unwrap();
76+
assert!(shutdown_resut.is_ok());
7677
// We still need to sleep, to give otel-collector a chance to flush to disk
7778
std::thread::sleep(SLEEP_DURATION);
7879

@@ -101,7 +102,8 @@ mod metrictests {
101102
],
102103
);
103104

104-
meter_provider.shutdown()?;
105+
let shutdown_resut = meter_provider.shutdown();
106+
assert!(shutdown_resut.is_ok());
105107
// We still need to sleep, to give otel-collector a chance to flush to disk
106108
std::thread::sleep(SLEEP_DURATION);
107109

@@ -127,7 +129,8 @@ mod metrictests {
127129
],
128130
);
129131

130-
meter_provider.shutdown()?;
132+
let shutdown_resut = meter_provider.shutdown();
133+
assert!(shutdown_resut.is_ok());
131134
// We still need to sleep, to give otel-collector a chance to flush to disk
132135
std::thread::sleep(SLEEP_DURATION);
133136

0 commit comments

Comments
 (0)