aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/end2end/tests/resource_quota_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/end2end/tests/resource_quota_server.c')
-rw-r--r--test/core/end2end/tests/resource_quota_server.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/core/end2end/tests/resource_quota_server.c b/test/core/end2end/tests/resource_quota_server.c
index 35f200b75f..7ec33e97a3 100644
--- a/test/core/end2end/tests/resource_quota_server.c
+++ b/test/core/end2end/tests/resource_quota_server.c
@@ -95,8 +95,9 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_destroy(f->cq);
}
-/* Creates and returns a gpr_slice containing random alphanumeric characters. */
-static gpr_slice generate_random_slice() {
+/* Creates and returns a grpc_slice containing random alphanumeric characters.
+ */
+static grpc_slice generate_random_slice() {
size_t i;
static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
char *output;
@@ -106,7 +107,7 @@ static gpr_slice generate_random_slice() {
output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
}
output[output_size - 1] = '\0';
- gpr_slice out = gpr_slice_from_copied_string(output);
+ grpc_slice out = grpc_slice_from_copied_string(output);
gpr_free(output);
return out;
}
@@ -135,7 +136,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
/* Create large request and response bodies. These are big enough to require
* multiple round trips to deliver to the peer, and their exact contents of
* will be verified on completion. */
- gpr_slice request_payload_slice = generate_random_slice();
+ grpc_slice request_payload_slice = generate_random_slice();
grpc_call **client_calls = malloc(sizeof(grpc_call *) * NUM_CALLS);
grpc_call **server_calls = malloc(sizeof(grpc_call *) * NUM_CALLS);
@@ -358,7 +359,7 @@ void resource_quota_server(grpc_end2end_test_config config) {
GPR_ASSERT(cancelled_calls_on_server >= 0.9 * cancelled_calls_on_client);
grpc_byte_buffer_destroy(request_payload);
- gpr_slice_unref(request_payload_slice);
+ grpc_slice_unref(request_payload_slice);
grpc_resource_quota_unref(resource_quota);
free(client_calls);