From 98e926b830602662a42fa3eb87cab6a3050ac7ba Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Tue, 17 Dec 2024 20:14:54 +0100 Subject: [PATCH] Apply suggestions from code review --- .../opentelemetry/ext/http/client/curl/http_client_curl.h | 2 +- ext/test/http/curl_http_test.cc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h b/ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h index f48adcbfc7..bef15997fc 100644 --- a/ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h +++ b/ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h @@ -358,7 +358,7 @@ class HttpClient : public opentelemetry::ext::http::client::HttpClient std::chrono::milliseconds scheduled_delay_milliseconds_; std::chrono::milliseconds background_thread_wait_for_; - std::atomic is_shutdown_; + std::atomic is_shutdown_{false}; nostd::shared_ptr curl_global_initializer_; }; diff --git a/ext/test/http/curl_http_test.cc b/ext/test/http/curl_http_test.cc index 6fb126e8b8..497c5bb529 100644 --- a/ext/test/http/curl_http_test.cc +++ b/ext/test/http/curl_http_test.cc @@ -548,9 +548,9 @@ TEST_F(BasicCurlHttpTests, ElegantQuitQuick) auto beg = std::chrono::system_clock::now(); http_client->FinishAllSessions(); http_client.reset(); - // when use background_thread_wait_for_ should have no side effort on elegant quit - // it shoule less than scheduled_delay_milliseconds_ - // because ci machine may slow, some take 10ms, so we assert it less than 20ms + // when background_thread_wait_for_ is used, it should have no side effect on elegant quit + // wait should be less than scheduled_delay_milliseconds_ + // Due to load on CI hosts (some take 10ms), we assert it is less than 20ms auto cost = std::chrono::system_clock::now() - beg; ASSERT_TRUE(cost < std::chrono::milliseconds{20}) << "cost ms: " << std::chrono::duration_cast(cost).count()