Fixed AllServerUnavailableFailFast test to return UNAVAILBLE instead

UNKNOWN.
reviewable/pr22280/r10
Donna Dionne 5 years ago
parent 0c2f9565f4
commit d9611cf1ca
  1. 4
      src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc
  2. 4
      test/cpp/end2end/xds_end2end_test.cc

@ -393,8 +393,8 @@ void XdsRoutingLb::UpdateStateLocked() {
break;
default:
picker = absl::make_unique<TransientFailurePicker>(
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"xds_routing: all children report state TRANSIENT_FAILURE"));
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING("TRANSIENT_FAILURE from XdsRoutingLb"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
}
channel_control_helper()->UpdateState(connectivity_state, std::move(picker));
}

@ -1748,9 +1748,7 @@ TEST_P(BasicTest, AllServersUnreachableFailFast) {
AdsServiceImpl::BuildEdsResource(args), kDefaultResourceName);
const Status status = SendRpc();
// The error shouldn't be DEADLINE_EXCEEDED.
gpr_log(GPR_INFO, "error code %d message received %s", status.error_code(),
status.error_message().c_str());
EXPECT_NE(StatusCode::DEADLINE_EXCEEDED, status.error_code());
EXPECT_EQ(StatusCode::UNAVAILABLE, status.error_code());
}
// Tests that RPCs fail when the backends are down, and will succeed again after

Loading…
Cancel
Save