clang-format

pull/1625/head
Craig Tiller 10 years ago
parent f95f048c3e
commit 3cdd9bbdbc
  1. 6
      test/cpp/end2end/crash_test.cc
  2. 1
      test/cpp/end2end/crash_test_server.cc
  3. 15
      test/cpp/util/subprocess.cc
  4. 2
      test/cpp/util/subprocess.h

@ -73,7 +73,8 @@ class CrashTest : public ::testing::Test {
protected:
CrashTest() {}
std::unique_ptr<grpc::cpp::test::util::TestService::Stub> CreateServerAndStub() {
std::unique_ptr<grpc::cpp::test::util::TestService::Stub>
CreateServerAndStub() {
auto port = grpc_pick_unused_port_or_die();
auto addr = (std::ostringstream() << "localhost:" << port).str();
server_.reset(new SubProcess({
@ -81,7 +82,8 @@ class CrashTest : public ::testing::Test {
(std::ostringstream() << "--address=" << addr).str(),
}));
GPR_ASSERT(server_);
return grpc::cpp::test::util::TestService::NewStub(CreateChannel(addr, InsecureCredentials(), ChannelArguments()));
return grpc::cpp::test::util::TestService::NewStub(
CreateChannel(addr, InsecureCredentials(), ChannelArguments()));
}
void KillServer() {

@ -83,7 +83,6 @@ void RunServer() {
std::cout << "Server listening on " << FLAGS_address << std::endl;
server->Wait();
}
}
}

@ -48,19 +48,12 @@ static gpr_subprocess *MakeProcess(std::initializer_list<std::string> args) {
}
SubProcess::SubProcess(std::initializer_list<std::string> args)
: subprocess_(MakeProcess(args)) {
}
: subprocess_(MakeProcess(args)) {}
SubProcess::~SubProcess() {
gpr_subprocess_destroy(subprocess_);
}
SubProcess::~SubProcess() { gpr_subprocess_destroy(subprocess_); }
int SubProcess::Join() {
return gpr_subprocess_join(subprocess_);
}
int SubProcess::Join() { return gpr_subprocess_join(subprocess_); }
void SubProcess::Interrupt() {
gpr_subprocess_interrupt(subprocess_);
}
void SubProcess::Interrupt() { gpr_subprocess_interrupt(subprocess_); }
} // namespace grpc

@ -53,7 +53,7 @@ class SubProcess {
SubProcess(const SubProcess& other);
SubProcess& operator=(const SubProcess& other);
gpr_subprocess *const subprocess_;
gpr_subprocess* const subprocess_;
};
} // namespace grpc

Loading…
Cancel
Save