Skip to content

Commit 98e926b

Browse files
authored
Apply suggestions from code review
1 parent a16b6ec commit 98e926b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/include/opentelemetry/ext/http/client/curl/http_client_curl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class HttpClient : public opentelemetry::ext::http::client::HttpClient
358358
std::chrono::milliseconds scheduled_delay_milliseconds_;
359359

360360
std::chrono::milliseconds background_thread_wait_for_;
361-
std::atomic<bool> is_shutdown_;
361+
std::atomic<bool> is_shutdown_{false};
362362

363363
nostd::shared_ptr<HttpCurlGlobalInitializer> curl_global_initializer_;
364364
};

ext/test/http/curl_http_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,9 @@ TEST_F(BasicCurlHttpTests, ElegantQuitQuick)
548548
auto beg = std::chrono::system_clock::now();
549549
http_client->FinishAllSessions();
550550
http_client.reset();
551-
// when use background_thread_wait_for_ should have no side effort on elegant quit
552-
// it shoule less than scheduled_delay_milliseconds_
553-
// because ci machine may slow, some take 10ms, so we assert it less than 20ms
551+
// when background_thread_wait_for_ is used, it should have no side effect on elegant quit
552+
// wait should be less than scheduled_delay_milliseconds_
553+
// Due to load on CI hosts (some take 10ms), we assert it is less than 20ms
554554
auto cost = std::chrono::system_clock::now() - beg;
555555
ASSERT_TRUE(cost < std::chrono::milliseconds{20})
556556
<< "cost ms: " << std::chrono::duration_cast<std::chrono::milliseconds>(cost).count()

0 commit comments

Comments
 (0)