Skip to content

Commit

Permalink
Fix code scanning alert (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
esigo authored Aug 3, 2022
1 parent b4d8245 commit d299348
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/test/http/curl_http_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestSyncTimeout)
curl::HttpClientSync http_client;

http_client::Headers m1 = {};
auto result = http_client.Get("http://222.222.222.200:19000/get/", m1);
auto result = http_client.Get("https://192.0.2.0:19000/get/", m1);
EXPECT_EQ(result, false);

// When network is under proxy, it may connect success but closed by peer when send data
Expand Down Expand Up @@ -415,7 +415,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestAsyncTimeout)
std::shared_ptr<GetEventHandler> handlers[batch_count];
for (unsigned i = 0; i < batch_count; ++i)
{
sessions[i] = http_client.CreateSession("http://222.222.222.200:19000/get/");
sessions[i] = http_client.CreateSession("https://192.0.2.0:19000/get/");
auto request = sessions[i]->CreateRequest();
request->SetMethod(http_client::Method::Get);
request->SetUri("get/");
Expand All @@ -426,7 +426,7 @@ TEST_F(BasicCurlHttpTests, SendGetRequestAsyncTimeout)
// Lock mtx_requests to prevent response, we will check IsSessionActive() in the end
std::unique_lock<std::mutex> lock_requests(mtx_requests);
sessions[i]->SendRequest(handlers[i]);
ASSERT_TRUE(sessions[i]->IsSessionActive());
ASSERT_TRUE(sessions[i]->IsSessionActive() || handlers[i]->is_called_);
}

for (unsigned i = 0; i < batch_count; ++i)
Expand Down

1 comment on commit d299348

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'OpenTelemetry-cpp sdk Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: d299348 Previous: b4d8245 Ratio
BM_BaselineBuffer/2 16718356.609344482 ns/iter 6552922.72567749 ns/iter 2.55

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.