|
|
@ -2986,11 +2986,16 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) { |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
|
|
|
|
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
|
|
|
|
|
|
|
|
// test from flaking while debugging potential root cause.
|
|
|
|
|
|
|
|
const double kErrorToleranceSmallLoad = 0.3; |
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs", |
|
|
|
|
|
|
|
weight_75_request_count, weight_25_request_count); |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorToleranceSmallLoad)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorToleranceSmallLoad)))); |
|
|
|
gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); |
|
|
|
gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3057,11 +3062,16 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetDefaultRoute) { |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
::testing::Le(kNumEchoRpcs * kWeight75 / 100 * |
|
|
|
::testing::Le(kNumEchoRpcs * kWeight75 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
|
|
|
|
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
|
|
|
|
|
|
|
|
// test from flaking while debugging potential root cause.
|
|
|
|
|
|
|
|
const double kErrorToleranceSmallLoad = 0.3; |
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs", |
|
|
|
|
|
|
|
weight_75_request_count, weight_25_request_count); |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
::testing::AllOf(::testing::Ge(kNumEchoRpcs * kWeight25 / 100 * |
|
|
|
::testing::AllOf(::testing::Ge(kNumEchoRpcs * kWeight25 / 100 * |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorToleranceSmallLoad)), |
|
|
|
::testing::Le(kNumEchoRpcs * kWeight25 / 100 * |
|
|
|
::testing::Le(kNumEchoRpcs * kWeight25 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorToleranceSmallLoad)))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) { |
|
|
|
TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) { |
|
|
@ -3150,11 +3160,16 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) { |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
|
|
|
|
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
|
|
|
|
|
|
|
|
// test from flaking while debugging potential root cause.
|
|
|
|
|
|
|
|
const double kErrorToleranceSmallLoad = 0.3; |
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs", |
|
|
|
|
|
|
|
weight_75_request_count, weight_25_request_count); |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorToleranceSmallLoad)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorToleranceSmallLoad)))); |
|
|
|
// Change Route Configurations: same clusters different weights.
|
|
|
|
// Change Route Configurations: same clusters different weights.
|
|
|
|
weighted_cluster1->mutable_weight()->set_value(kWeight50); |
|
|
|
weighted_cluster1->mutable_weight()->set_value(kWeight50); |
|
|
|
weighted_cluster2->mutable_weight()->set_value(kWeight50); |
|
|
|
weighted_cluster2->mutable_weight()->set_value(kWeight50); |
|
|
@ -3275,11 +3290,16 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) { |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
|
|
|
|
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
|
|
|
|
|
|
|
|
// test from flaking while debugging potential root cause.
|
|
|
|
|
|
|
|
const double kErrorToleranceSmallLoad = 0.3; |
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs", |
|
|
|
|
|
|
|
weight_75_request_count, weight_25_request_count); |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorToleranceSmallLoad)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorToleranceSmallLoad)))); |
|
|
|
// Change Route Configurations: new set of clusters with different weights.
|
|
|
|
// Change Route Configurations: new set of clusters with different weights.
|
|
|
|
weighted_cluster1->mutable_weight()->set_value(kWeight50); |
|
|
|
weighted_cluster1->mutable_weight()->set_value(kWeight50); |
|
|
|
weighted_cluster2->set_name(kNewCluster2Name); |
|
|
|
weighted_cluster2->set_name(kNewCluster2Name); |
|
|
@ -3333,11 +3353,15 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) { |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
|
|
|
|
// TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
|
|
|
|
|
|
|
|
// test from flaking while debugging potential root cause.
|
|
|
|
|
|
|
|
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs", |
|
|
|
|
|
|
|
weight_75_request_count, weight_25_request_count); |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
EXPECT_THAT(weight_25_request_count, |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 - kErrorTolerance)), |
|
|
|
(1 - kErrorToleranceSmallLoad)), |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 * |
|
|
|
(1 + kErrorTolerance)))); |
|
|
|
(1 + kErrorToleranceSmallLoad)))); |
|
|
|
gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); |
|
|
|
gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_ROUTING"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|