Skip to content

Commit ef9f82e

Browse files
committed
deps: bump googletest to v1.17.0 without regex and memory pool changes
Signed-off-by: Rohit Agrawal <[email protected]>
1 parent 41b06ef commit ef9f82e

File tree

8 files changed

+21
-24
lines changed

8 files changed

+21
-24
lines changed

test/common/http/header_mutation_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ TEST(HeaderMutationTest, Death) {
276276
ProtoHeaderMutatons proto_mutations;
277277
proto_mutations.Add();
278278

279-
EXPECT_DEATH(HeaderMutations::create(proto_mutations).IgnoreError(), ".*unset oneof.*");
279+
EXPECT_DEATH(HeaderMutations::create(proto_mutations).IgnoreError(), "unset oneof");
280280
}
281281

282282
} // namespace

test/common/quic/envoy_quic_proof_verifier_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ TEST_F(EnvoyQuicProofVerifierTest, VerifyProof) {
446446
configCertVerificationDetails(true);
447447
EXPECT_DEATH(verifier_->VerifyProof("", 0, "", quic::QUIC_VERSION_IETF_RFC_V1, "", {}, "", "",
448448
nullptr, nullptr, nullptr, {}),
449-
".*not implemented.*");
449+
"not implemented");
450450
}
451451

452452
TEST_F(EnvoyQuicProofVerifierTest, CreateDefaultContext) {

test/common/quic/quic_filter_manager_connection_impl_test.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ TEST_F(QuicFilterManagerConnectionImplTest, RawWrite) {
114114
}
115115

116116
TEST_F(QuicFilterManagerConnectionImplTest, BufferLimit) {
117-
EXPECT_DEATH(impl_.bufferLimit(), ".*not implemented.*");
117+
EXPECT_DEATH(impl_.bufferLimit(), "not implemented");
118118
}
119119

120120
TEST_F(QuicFilterManagerConnectionImplTest, SetBufferLimits) {
@@ -127,11 +127,12 @@ TEST_F(QuicFilterManagerConnectionImplTest, CloseConnection) {
127127
}
128128

129129
TEST_F(QuicFilterManagerConnectionImplTest, GetWriteBuffer) {
130-
EXPECT_DEATH(impl_.getWriteBuffer(), ".*not implemented.*");
130+
EXPECT_DEATH(impl_.getWriteBuffer(), "not implemented");
131131
}
132132

133133
TEST_F(QuicFilterManagerConnectionImplTest, EnableHalfClose) {
134-
EXPECT_DEATH(impl_.enableHalfClose(true), ".*Quic connection doesn't support half close.*");
134+
impl_.enableHalfClose(false); // No-op
135+
EXPECT_DEATH(impl_.enableHalfClose(true), "Quic connection doesn't support half close.");
135136
}
136137

137138
TEST_F(QuicFilterManagerConnectionImplTest, IsHalfCloseEnabled) {

test/extensions/filters/http/kill_request/kill_request_filter_test.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ TEST_F(KillRequestFilterTest, KillRequestCrashEnvoy) {
4747

4848
ON_CALL(random_generator_, random()).WillByDefault(Return(0));
4949
EXPECT_DEATH(filter_->decodeHeaders(request_headers_, false),
50-
".*KillRequestFilter is crashing Envoy!!!.*");
50+
"KillRequestFilter is crashing Envoy!!!");
5151
}
5252

5353
TEST_F(KillRequestFilterTest, KillRequestCrashEnvoyWithCustomKillHeader) {
@@ -59,15 +59,15 @@ TEST_F(KillRequestFilterTest, KillRequestCrashEnvoyWithCustomKillHeader) {
5959

6060
ON_CALL(random_generator_, random()).WillByDefault(Return(0));
6161
EXPECT_DEATH(filter_->decodeHeaders(request_headers_, false),
62-
".*KillRequestFilter is crashing Envoy!!!.*");
62+
"KillRequestFilter is crashing Envoy!!!");
6363
}
6464

6565
TEST_F(KillRequestFilterTest, KillRequestWithMillionDenominatorCrashEnvoy) {
6666
envoy::extensions::filters::http::kill_request::v3::KillRequest kill_request;
6767
kill_request.mutable_probability()->set_numerator(1);
6868
kill_request.mutable_probability()->set_denominator(envoy::type::v3::FractionalPercent::MILLION);
6969
setUpTest(kill_request);
70-
request_headers_.addCopy("x-envoy-kill-request", "yes");
70+
request_headers_.addCopy("x-envoy-kill-request", "true");
7171

7272
ON_CALL(random_generator_, random()).WillByDefault(Return(0));
7373
EXPECT_DEATH(filter_->decodeHeaders(request_headers_, false),
@@ -183,7 +183,7 @@ TEST_F(KillRequestFilterTest, CanKillOnResponse) {
183183
ON_CALL(random_generator_, random()).WillByDefault(Return(0));
184184
response_headers_.addCopy("x-envoy-kill-request", "true");
185185
EXPECT_DEATH(filter_->encodeHeaders(response_headers_, false),
186-
".*KillRequestFilter is crashing Envoy!!!.*");
186+
"KillRequestFilter is crashing Envoy!!!");
187187
}
188188

189189
TEST_F(KillRequestFilterTest, KillsBasedOnDirection) {
@@ -201,7 +201,7 @@ TEST_F(KillRequestFilterTest, KillsBasedOnDirection) {
201201
ON_CALL(random_generator_, random()).WillByDefault(Return(0));
202202
response_headers_.addCopy("x-envoy-kill-request", "true");
203203
EXPECT_DEATH(filter_->encodeHeaders(response_headers_, false),
204-
".*KillRequestFilter is crashing Envoy!!!.*");
204+
"KillRequestFilter is crashing Envoy!!!");
205205
}
206206

207207
TEST_F(KillRequestFilterTest, PerRouteKillSettingFound) {

test/extensions/matching/input_matchers/cel_matcher/cel_matcher_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ TEST_F(CelMatcherTest, CelMatcherRequestResponseNotMatchedWithParsedExprUseCel)
562562

563563
TEST_F(CelMatcherTest, NoCelExpression) {
564564
EXPECT_DEATH(buildMatcherTree(RequestHeaderCelExprString, ExpressionType::NoExpression),
565-
".*unset oneof.*");
565+
".*panic: unset oneof.*");
566566
}
567567

568568
} // namespace CelMatcher

test/integration/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ envoy_cc_test_library(
11421142
hdrs = [
11431143
"fake_upstream.h",
11441144
],
1145-
rbe_pool = "12gig", # Increased from 6gig to prevent OOM kills during compilation
1145+
rbe_pool = "6gig",
11461146
deps = [
11471147
":utility_lib",
11481148
"//envoy/api:api_interface",
@@ -1222,7 +1222,7 @@ envoy_cc_test_library(
12221222
hdrs = [
12231223
"base_integration_test.h",
12241224
],
1225-
rbe_pool = "12gig", # Increased from 6gig to prevent OOM kills during compilation
1225+
rbe_pool = "6gig",
12261226
deps = [
12271227
":async_round_robin_lb",
12281228
":autonomous_upstream_lib",
@@ -1267,7 +1267,7 @@ envoy_cc_test_library(
12671267
hdrs = [
12681268
"autonomous_upstream.h",
12691269
],
1270-
rbe_pool = "12gig", # Increased from 6gig to prevent OOM kills during compilation
1270+
rbe_pool = "6gig",
12711271
deps = [
12721272
":fake_upstream_lib",
12731273
],

test/server/guarddog_impl_test.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,11 @@ INSTANTIATE_TEST_SUITE_P(TimeSystemType, GuardDogTestBase,
8989
class GuardDogDeathTest : public GuardDogTestBase {
9090
protected:
9191
GuardDogDeathTest()
92-
: config_kill_(1000, 1000, 100, 1000, 0, std::vector<std::string>{}),
92+
: config_kill_(1000, 1000, 1000, 1000, 0, std::vector<std::string>{}),
9393
config_multikill_(1000, 1000, 1000, 500, 0, std::vector<std::string>{}),
9494
config_multikill_threshold_(1000, 1000, 1000, 500, 60, std::vector<std::string>{}) {}
9595

96-
void SetUp() override {
97-
GTEST_FLAG_SET(death_test_style, "threadsafe");
98-
GuardDogTestBase::SetUp();
99-
}
96+
void SetUp() override { GuardDogTestBase::SetUp(); }
10097

10198
/**
10299
* This does everything but the final forceCheckForTest() that should cause

test/test_listener.cc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,15 @@ void TestListener::OnTestEnd(const ::testing::TestInfo& test_info) {
2828
test_info.name(), "] test exited before main thread shut down"));
2929
}
3030

31-
// Save death_test_style flag value before resetting flags
32-
std::string death_test_style = ::absl::GetFlag(FLAGS_gtest_death_test_style);
33-
3431
// We must do this in two phases; reset the old flags to get back to the clean state before
3532
// constructing a new flag saver to latch the clean values.
3633
saver_.reset();
3734
saver_ = std::make_unique<::absl::FlagSaver>();
3835

39-
// Restore the death_test_style flag to its previous value
40-
::absl::SetFlag(&FLAGS_gtest_death_test_style, death_test_style);
36+
// Always set the death_test_style flag to "threadsafe" regardless of its previous value
37+
// This is needed because some tests might internally reset this value, and we need to
38+
// ensure all death tests run in threadsafe mode as required by Envoy
39+
::absl::SetFlag(&FLAGS_gtest_death_test_style, "threadsafe");
4140
}
4241

4342
} // namespace Envoy

0 commit comments

Comments
 (0)