|
|
|
@ -41,6 +41,7 @@ |
|
|
|
|
#include "src/core/ext/xds/xds_client.h" |
|
|
|
|
#include "src/core/lib/gpr/env.h" |
|
|
|
|
#include "src/core/lib/gpr/tmpfile.h" |
|
|
|
|
#include "src/core/lib/surface/server.h" |
|
|
|
|
#include "src/cpp/client/secure_credentials.h" |
|
|
|
|
#include "src/proto/grpc/testing/xds/v3/router.grpc.pb.h" |
|
|
|
|
#include "test/core/util/resolve_localhost_ip46.h" |
|
|
|
@ -159,6 +160,17 @@ void XdsEnd2endTest::ServerThread::Shutdown() { |
|
|
|
|
running_ = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void XdsEnd2endTest::ServerThread::StopListeningAndSendGoaways() { |
|
|
|
|
gpr_log(GPR_INFO, "%s sending GOAWAYs", Type()); |
|
|
|
|
{ |
|
|
|
|
grpc_core::ExecCtx exec_ctx; |
|
|
|
|
auto* server = grpc_core::Server::FromC(server_->c_server()); |
|
|
|
|
server->StopListening(); |
|
|
|
|
server->SendGoaways(); |
|
|
|
|
} |
|
|
|
|
gpr_log(GPR_INFO, "%s done sending GOAWAYs", Type()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void XdsEnd2endTest::ServerThread::Serve(grpc_core::Mutex* mu, |
|
|
|
|
grpc_core::CondVar* cond) { |
|
|
|
|
// We need to acquire the lock here in order to prevent the notify_one
|
|
|
|
|