aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-10-17 14:52:14 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-10-17 14:52:14 -0700
commit20afa3d7c933207c548ed11928c47b552b5b2f80 (patch)
treeea93d7458fb454dde9aca2083bf1fa89e69c189a /test/cpp
parent654b242ce70afcf9fdab674cab9b71d8d3f02502 (diff)
BufferPool --> ResourceQuota
Diffstat (limited to 'test/cpp')
-rw-r--r--test/cpp/end2end/end2end_test.cc15
-rw-r--r--test/cpp/qps/server_async.cc8
-rw-r--r--test/cpp/qps/server_sync.cc8
3 files changed, 16 insertions, 15 deletions
diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc
index 17e6d248b5..a94ed4d8da 100644
--- a/test/cpp/end2end/end2end_test.cc
+++ b/test/cpp/end2end/end2end_test.cc
@@ -34,10 +34,10 @@
#include <mutex>
#include <thread>
-#include <grpc++/buffer_pool.h>
#include <grpc++/channel.h>
#include <grpc++/client_context.h>
#include <grpc++/create_channel.h>
+#include <grpc++/resource_quota.h>
#include <grpc++/security/auth_metadata_processor.h>
#include <grpc++/security/credentials.h>
#include <grpc++/security/server_credentials.h>
@@ -1481,19 +1481,20 @@ TEST_P(SecureEnd2endTest, ClientAuthContext) {
}
}
-class BufferPoolEnd2endTest : public End2endTest {
+class ResourceQuotaEnd2endTest : public End2endTest {
public:
- BufferPoolEnd2endTest() : server_buffer_pool_("server_buffer_pool") {}
+ ResourceQuotaEnd2endTest()
+ : server_resource_quota_("server_resource_quota") {}
virtual void ConfigureServerBuilder(ServerBuilder* builder) GRPC_OVERRIDE {
- builder->SetBufferPool(server_buffer_pool_);
+ builder->SetResourceQuota(server_resource_quota_);
}
private:
- BufferPool server_buffer_pool_;
+ ResourceQuota server_resource_quota_;
};
-TEST_P(BufferPoolEnd2endTest, SimpleRequest) {
+TEST_P(ResourceQuotaEnd2endTest, SimpleRequest) {
ResetStub();
EchoRequest request;
@@ -1543,7 +1544,7 @@ INSTANTIATE_TEST_CASE_P(SecureEnd2end, SecureEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(false, false,
true)));
-INSTANTIATE_TEST_CASE_P(BufferPoolEnd2end, BufferPoolEnd2endTest,
+INSTANTIATE_TEST_CASE_P(ResourceQuotaEnd2end, ResourceQuotaEnd2endTest,
::testing::ValuesIn(CreateTestScenarios(false, true,
true)));
diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc
index 3d2ac78868..b2529a1121 100644
--- a/test/cpp/qps/server_async.cc
+++ b/test/cpp/qps/server_async.cc
@@ -37,8 +37,8 @@
#include <mutex>
#include <thread>
-#include <grpc++/buffer_pool.h>
#include <grpc++/generic/async_generic_service.h>
+#include <grpc++/resource_quota.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
@@ -96,9 +96,9 @@ class AsyncQpsServerTest : public Server {
srv_cqs_.emplace_back(builder.AddCompletionQueue());
}
- if (config.buffer_pool_size() > 0) {
- builder.SetBufferPool(
- BufferPool("AsyncQpsServerTest").Resize(config.buffer_pool_size()));
+ if (config.resource_quota_size() > 0) {
+ builder.SetResourceQuota(ResourceQuota("AsyncQpsServerTest")
+ .Resize(config.resource_quota_size()));
}
server_ = builder.BuildAndStart();
diff --git a/test/cpp/qps/server_sync.cc b/test/cpp/qps/server_sync.cc
index 97f709b714..96f50a35ac 100644
--- a/test/cpp/qps/server_sync.cc
+++ b/test/cpp/qps/server_sync.cc
@@ -33,7 +33,7 @@
#include <thread>
-#include <grpc++/buffer_pool.h>
+#include <grpc++/resource_quota.h>
#include <grpc++/security/server_credentials.h>
#include <grpc++/server.h>
#include <grpc++/server_builder.h>
@@ -94,9 +94,9 @@ class SynchronousServer GRPC_FINAL : public grpc::testing::Server {
Server::CreateServerCredentials(config));
gpr_free(server_address);
- if (config.buffer_pool_size() > 0) {
- builder.SetBufferPool(
- BufferPool("AsyncQpsServerTest").Resize(config.buffer_pool_size()));
+ if (config.resource_quota_size() > 0) {
+ builder.SetResourceQuota(ResourceQuota("AsyncQpsServerTest")
+ .Resize(config.resource_quota_size()));
}
builder.RegisterService(&service_);