diff options
author | Sree Kuchibhotla <sreek@google.com> | 2018-07-20 10:28:40 -0700 |
---|---|---|
committer | Sree Kuchibhotla <sreek@google.com> | 2018-07-20 15:10:16 -0700 |
commit | ec1c112cc17cd1290a901ca606ac916422d3342c (patch) | |
tree | f3a12769e02c116b0bcbba288562e6e514e58b0b /test/cpp | |
parent | f2a57cdd75c1f808f7682f4d21ab85509be0c006 (diff) |
Each ThreadManager is a resource user
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/thread_manager/thread_manager_test.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/cpp/thread_manager/thread_manager_test.cc b/test/cpp/thread_manager/thread_manager_test.cc index 7a95a9f17d..cf2cf770e6 100644 --- a/test/cpp/thread_manager/thread_manager_test.cc +++ b/test/cpp/thread_manager/thread_manager_test.cc @@ -32,8 +32,8 @@ namespace grpc { class ThreadManagerTest final : public grpc::ThreadManager { public: - ThreadManagerTest() - : ThreadManager(kMinPollers, kMaxPollers), + ThreadManagerTest(const char* name, grpc_resource_quota* rq) + : ThreadManager(name, rq, kMinPollers, kMaxPollers), num_do_work_(0), num_poll_for_work_(0), num_work_found_(0) {} @@ -115,7 +115,11 @@ int main(int argc, char** argv) { std::srand(std::time(nullptr)); grpc::testing::InitTest(&argc, &argv, true); - grpc::ThreadManagerTest test_rpc_manager; + + grpc_resource_quota* rq = grpc_resource_quota_create("Test"); + grpc::ThreadManagerTest test_rpc_manager("TestThreadManager", rq); + grpc_resource_quota_unref(rq); + test_rpc_manager.PerformTest(); return 0; |