Skip to content

Commit b5776ee

Browse files
committed
[TEST] Drop a guard inside the case that can never be reached
The case carried its own ENABLE_OTLP_COMPRESSION_PREVIEW check with a GTEST_SKIP for the other direction. The file already wraps this whole region, GzipEventHandler and the two other gzip cases included, in that same macro, so when it is undefined the case does not exist and the skip cannot run. The two cases beside it have no such guard. Bazel is where the difference shows: it does not define the macro, and the test binary there registers 26 cases where the CMake build with compression on registers 29. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
1 parent 86b89b4 commit b5776ee

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

‎ext/test/http/curl_http_test.cc‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,6 @@ struct GzipEventHandler : public CustomEventHandler
10011001
// Z_BUF_ERROR. No allocator hook and no timing are involved.
10021002
TEST_F(BasicCurlHttpTests, AFailedCompressionStopsTheRequest)
10031003
{
1004-
# ifdef ENABLE_OTLP_COMPRESSION_PREVIEW
10051004
received_requests_.clear();
10061005
auto session_manager = std::make_shared<http_client::curl::HttpCurlClientFactory>()->Create();
10071006
ASSERT_TRUE(session_manager != nullptr);
@@ -1034,9 +1033,6 @@ TEST_F(BasicCurlHttpTests, AFailedCompressionStopsTheRequest)
10341033
std::unique_lock<std::mutex> lk1(mtx_requests);
10351034
EXPECT_TRUE(received_requests_.empty())
10361035
<< "a request the caller was told had failed was sent anyway";
1037-
# else
1038-
GTEST_SKIP() << "gzip is not compiled in, so there is no compression step to fail";
1039-
# endif // ENABLE_OTLP_COMPRESSION_PREVIEW
10401036
}
10411037

10421038
TEST_F(BasicCurlHttpTests, GzipCompressibleData)

0 commit comments

Comments
 (0)