Skip to content

Commit

Permalink
Add wait before calling shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomsonTan committed Dec 18, 2024
1 parent 45ad6d6 commit a04683a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions opentelemetry-otlp/tests/integration_test/tests/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ pub async fn test_logs() -> Result<()> {
log::set_max_level(Level::Info.to_level_filter());

info!(target: "my-target", "hello from {}. My price is {}.", "banana", 2.99);

// TODO: remove below wait before calling logger_provider.shutdown()
tokio::time::sleep(Duration::from_secs(10)).await;
let _ = logger_provider.shutdown();

tokio::time::sleep(Duration::from_secs(10)).await;
Expand Down

0 comments on commit a04683a

Please sign in to comment.