|
|
|
@ -2339,8 +2339,6 @@ TEST_P(CdsTest, Timeout) { |
|
|
|
|
|
|
|
|
|
using EdsTest = BasicTest; |
|
|
|
|
|
|
|
|
|
// TODO(roth): Add tests showing that RPCs fail when EDS data is invalid.
|
|
|
|
|
|
|
|
|
|
TEST_P(EdsTest, Timeout) { |
|
|
|
|
ResetStub(0, 0, "", 500); |
|
|
|
|
balancers_[0]->ads_service()->SetResourceIgnore(kEdsTypeUrl); |
|
|
|
@ -2349,6 +2347,34 @@ TEST_P(EdsTest, Timeout) { |
|
|
|
|
CheckRpcSendFailure(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Tests that EDS client should send a NACK if the EDS update contains
|
|
|
|
|
// no localities but does not say to drop all calls.
|
|
|
|
|
TEST_P(EdsTest, NacksNoLocalitiesWithoutDropAll) { |
|
|
|
|
SetNextResolution({}); |
|
|
|
|
SetNextResolutionForLbChannelAllBalancers(); |
|
|
|
|
AdsServiceImpl::EdsResourceArgs args; |
|
|
|
|
balancers_[0]->ads_service()->SetEdsResource( |
|
|
|
|
AdsServiceImpl::BuildEdsResource(args), kDefaultResourceName); |
|
|
|
|
CheckRpcSendFailure(); |
|
|
|
|
EXPECT_EQ(balancers_[0]->ads_service()->eds_response_state(), |
|
|
|
|
AdsServiceImpl::NACKED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Tests that EDS client should send a NACK if the EDS update contains
|
|
|
|
|
// sparse priorities.
|
|
|
|
|
TEST_P(EdsTest, NacksSparsePriorityList) { |
|
|
|
|
SetNextResolution({}); |
|
|
|
|
SetNextResolutionForLbChannelAllBalancers(); |
|
|
|
|
AdsServiceImpl::EdsResourceArgs args({ |
|
|
|
|
{"locality0", GetBackendPorts(), kDefaultLocalityWeight, 1}, |
|
|
|
|
}); |
|
|
|
|
balancers_[0]->ads_service()->SetEdsResource( |
|
|
|
|
AdsServiceImpl::BuildEdsResource(args), kDefaultResourceName); |
|
|
|
|
CheckRpcSendFailure(); |
|
|
|
|
EXPECT_EQ(balancers_[0]->ads_service()->eds_response_state(), |
|
|
|
|
AdsServiceImpl::NACKED); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
using LocalityMapTest = BasicTest; |
|
|
|
|
|
|
|
|
|
// Tests that the localities in a locality map are picked according to their
|
|
|
|
|