Skip to content

Commit

Permalink
xds-failover: fixing runtime feature flag in tests
Browse files Browse the repository at this point in the history
Signed-off-by: Adi Suissa-Peleg <[email protected]>
  • Loading branch information
adisuissa committed Oct 16, 2024
1 parent b1a9025 commit 1ea42a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ TEST_F(GrpcMuxFailoverTest, PrimaryOnlyAttemptsAfterPrimaryAvailable) {
// will try to reconnect to the primary (and then failover), and keep
// alternating between the two.
TEST_F(GrpcMuxFailoverTest, AlternatingPrimaryAndFailoverAttemptsAfterFailoverAvailable) {
TestScopedRuntime scoped_runtime;
scoped_runtime.mergeValues(
{{"envoy.reloadable_features.xds_failover_to_primary_enabled", "true"}});
connectToFailover();

// Emulate a 5 times disconnects.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,8 @@ TEST_P(XdsFailoverAdsIntegrationTest, NoFailoverUseAfterPrimaryResponse) {

// Validate that once failover responds, and then disconnects, primary will be attempted.
TEST_P(XdsFailoverAdsIntegrationTest, PrimaryUseAfterFailoverResponseAndDisconnect) {
config_helper_.addRuntimeOverride("envoy.reloadable_features.xds_failover_to_primary_enabled",
"true");
// These tests are not executed with GoogleGrpc because they are flaky due to
// the large timeout values for retries.
SKIP_IF_GRPC_CLIENT(Grpc::ClientType::GoogleGrpc);
Expand Down Expand Up @@ -692,6 +694,8 @@ TEST_P(XdsFailoverAdsIntegrationTest, PrimaryUseAfterFailoverResponseAndDisconne
// still doesn't respond, failover will be attempted with the correct
// initial_resource_versions.
TEST_P(XdsFailoverAdsIntegrationTest, FailoverUseAfterFailoverResponseAndDisconnect) {
config_helper_.addRuntimeOverride("envoy.reloadable_features.xds_failover_to_primary_enabled",
"true");
// These tests are not executed with GoogleGrpc because they are flaky due to
// the large timeout values for retries.
SKIP_IF_GRPC_CLIENT(Grpc::ClientType::GoogleGrpc);
Expand Down Expand Up @@ -814,6 +818,8 @@ TEST_P(XdsFailoverAdsIntegrationTest, FailoverUseAfterFailoverResponseAndDisconn
// both are not responding.
TEST_P(XdsFailoverAdsIntegrationTest,
PrimaryAndFailoverAttemptsAfterFailoverResponseAndDisconnect) {
config_helper_.addRuntimeOverride("envoy.reloadable_features.xds_failover_to_primary_enabled",
"true");
// These tests are not executed with GoogleGrpc because they are flaky due to
// the large timeout values for retries.
SKIP_IF_GRPC_CLIENT(Grpc::ClientType::GoogleGrpc);
Expand Down

0 comments on commit 1ea42a6

Please sign in to comment.