Add a thread stress end2end test

pull/1397/head
Craig Tiller 10 years ago
parent 581737ce27
commit 81e57d9acf
  1. 11
      test/cpp/end2end/end2end_test.cc

@ -576,6 +576,17 @@ TEST_F(End2endTest, ClientCancelsBidi) {
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.code());
}
TEST_F(End2endTest, ThreadStress) {
ResetStub();
std::vector<std::thread*> threads;
for (int i = 0; i < 100; ++i) {
threads.push_back(new std::thread(SendRpc, stub_.get(), 1000));
}
for (int i = 0; i < 100; ++i) {
threads[i]->join();
delete threads[i];
}
}
} // namespace testing
} // namespace grpc

Loading…
Cancel
Save