File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
test/extensions/config_subscription/grpc Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -179,6 +179,15 @@ class XdsFailoverAdsIntegrationTest : public AdsDeltaSotwIntegrationSubStatePara
179
179
void primaryConnectionFailure () {
180
180
AssertionResult result = xds_upstream_->waitForHttpConnection (*dispatcher_, xds_connection_);
181
181
RELEASE_ASSERT (result, result.message ());
182
+ // When GoogleGrpc is used, there may be cases where the connection will be
183
+ // disconnected before the gRPC library observes the TLS handshake, which will
184
+ // end up in a fast retry without notifying Envoy that the connection was
185
+ // disconnected. We wait for a stream to ensure that the gRPC library
186
+ // observed a successful connection.
187
+ if (clientType () == Grpc::ClientType::GoogleGrpc) {
188
+ result = xds_connection_->waitForNewStream (*dispatcher_, xds_stream_);
189
+ RELEASE_ASSERT (result, result.message ());
190
+ }
182
191
result = xds_connection_->close ();
183
192
RELEASE_ASSERT (result, result.message ());
184
193
}
You can’t perform that action at this time.
0 commit comments