aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/end2end/end2end_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/cpp/end2end/end2end_test.cc')
-rw-r--r--test/cpp/end2end/end2end_test.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 5e89490ecb..93d7ace9a2 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/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