blob: 0ee014f97d0b9f539a5429b1a7e08a5c590d2fc9 [file] [log] [blame]
Craig Tiller20afa3d2016-10-17 14:52:14 -07001/*
2 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02003 * Copyright 2016 gRPC authors.
Craig Tiller20afa3d2016-10-17 14:52:14 -07004 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02005 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
Craig Tiller20afa3d2016-10-17 14:52:14 -07008 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +02009 * http://www.apache.org/licenses/LICENSE-2.0
Craig Tiller20afa3d2016-10-17 14:52:14 -070010 *
Jan Tattermusch7897ae92017-06-07 22:57:36 +020011 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
Craig Tiller20afa3d2016-10-17 14:52:14 -070016 *
17 */
18
19#include "test/core/end2end/end2end_tests.h"
20
21#include <stdio.h>
22#include <string.h>
23
24#include <grpc/byte_buffer.h>
25#include <grpc/support/alloc.h>
26#include <grpc/support/log.h>
27#include <grpc/support/time.h>
28#include <grpc/support/useful.h>
29#include "test/core/end2end/cq_verifier.h"
30
Craig Tillerbaa14a92017-11-03 09:09:36 -070031static void* tag(intptr_t t) { return (void*)t; }
Craig Tiller20afa3d2016-10-17 14:52:14 -070032
33static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
Craig Tillerbaa14a92017-11-03 09:09:36 -070034 const char* test_name,
35 grpc_channel_args* client_args,
36 grpc_channel_args* server_args) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070037 grpc_end2end_test_fixture f;
Robbie Shade55a046a2017-01-25 15:14:28 -050038 gpr_log(GPR_INFO, "Running test: %s/%s", test_name, config.name);
Craig Tiller20afa3d2016-10-17 14:52:14 -070039 f = config.create_fixture(client_args, server_args);
40 config.init_server(&f, server_args);
Mark D. Rothfe858512016-11-01 11:14:35 -070041 config.init_client(&f, client_args);
Craig Tiller20afa3d2016-10-17 14:52:14 -070042 return f;
43}
44
Chris Evansed2a5472017-03-27 17:34:51 -050045static gpr_timespec n_seconds_from_now(int n) {
Robbie Shadeca7effc2017-01-17 09:14:29 -050046 return grpc_timeout_seconds_to_deadline(n);
Craig Tiller20afa3d2016-10-17 14:52:14 -070047}
48
Chris Evansed2a5472017-03-27 17:34:51 -050049static gpr_timespec five_seconds_from_now(void) {
50 return n_seconds_from_now(5);
51}
Craig Tiller20afa3d2016-10-17 14:52:14 -070052
Craig Tillerbaa14a92017-11-03 09:09:36 -070053static void drain_cq(grpc_completion_queue* cq) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070054 grpc_event ev;
55 do {
Craig Tiller4ac2b8e2017-11-10 14:14:17 -080056 ev = grpc_completion_queue_next(cq, five_seconds_from_now(), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -070057 } while (ev.type != GRPC_QUEUE_SHUTDOWN);
58}
59
Craig Tillerbaa14a92017-11-03 09:09:36 -070060static void shutdown_server(grpc_end2end_test_fixture* f) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070061 if (!f->server) return;
Sree Kuchibhotla321881d2017-02-27 11:25:28 -080062 grpc_server_shutdown_and_notify(f->server, f->shutdown_cq, tag(1000));
63 GPR_ASSERT(grpc_completion_queue_pluck(f->shutdown_cq, tag(1000),
64 grpc_timeout_seconds_to_deadline(5),
Craig Tiller4ac2b8e2017-11-10 14:14:17 -080065 nullptr)
Craig Tiller20afa3d2016-10-17 14:52:14 -070066 .type == GRPC_OP_COMPLETE);
67 grpc_server_destroy(f->server);
Craig Tiller4ac2b8e2017-11-10 14:14:17 -080068 f->server = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -070069}
70
Craig Tillerbaa14a92017-11-03 09:09:36 -070071static void shutdown_client(grpc_end2end_test_fixture* f) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070072 if (!f->client) return;
73 grpc_channel_destroy(f->client);
Craig Tiller4ac2b8e2017-11-10 14:14:17 -080074 f->client = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -070075}
76
Craig Tillerbaa14a92017-11-03 09:09:36 -070077static void end_test(grpc_end2end_test_fixture* f) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070078 shutdown_server(f);
79 shutdown_client(f);
80
81 grpc_completion_queue_shutdown(f->cq);
82 drain_cq(f->cq);
83 grpc_completion_queue_destroy(f->cq);
Sree Kuchibhotla321881d2017-02-27 11:25:28 -080084 grpc_completion_queue_destroy(f->shutdown_cq);
Craig Tiller20afa3d2016-10-17 14:52:14 -070085}
86
Craig Tiller28b72422016-10-26 21:15:29 -070087/* Creates and returns a grpc_slice containing random alphanumeric characters.
88 */
Craig Tillerd41a4a72016-10-26 16:16:06 -070089static grpc_slice generate_random_slice() {
Craig Tiller20afa3d2016-10-17 14:52:14 -070090 size_t i;
91 static const char chars[] = "abcdefghijklmnopqrstuvwxyz1234567890";
Craig Tillerbaa14a92017-11-03 09:09:36 -070092 char* output;
Craig Tillerf4050352016-10-28 08:59:55 -070093 const size_t output_size = 1024 * 1024;
Craig Tillerbaa14a92017-11-03 09:09:36 -070094 output = (char*)gpr_malloc(output_size);
Craig Tillerf4050352016-10-28 08:59:55 -070095 for (i = 0; i < output_size - 1; ++i) {
Craig Tiller20afa3d2016-10-17 14:52:14 -070096 output[i] = chars[rand() % (int)(sizeof(chars) - 1)];
97 }
Craig Tillerf4050352016-10-28 08:59:55 -070098 output[output_size - 1] = '\0';
Craig Tiller41fd9f22016-10-31 14:42:53 -070099 grpc_slice out = grpc_slice_from_copied_string(output);
Craig Tillerf4050352016-10-28 08:59:55 -0700100 gpr_free(output);
101 return out;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700102}
103
104void resource_quota_server(grpc_end2end_test_config config) {
Robbie Shade1f834292017-03-10 09:22:22 -0500105 if (config.feature_mask &
106 FEATURE_MASK_DOES_NOT_SUPPORT_RESOURCE_QUOTA_SERVER) {
107 return;
108 }
Craig Tillerbaa14a92017-11-03 09:09:36 -0700109 grpc_resource_quota* resource_quota =
Craig Tillerafcc8752016-10-18 16:10:06 -0700110 grpc_resource_quota_create("test_server");
Craig Tiller20afa3d2016-10-17 14:52:14 -0700111 grpc_resource_quota_resize(resource_quota, 5 * 1024 * 1024);
112
113#define NUM_CALLS 100
Craig Tilleraf723b02017-07-17 17:56:28 -0700114#define CLIENT_BASE_TAG 0x1000
115#define SERVER_START_BASE_TAG 0x2000
116#define SERVER_RECV_BASE_TAG 0x3000
117#define SERVER_END_BASE_TAG 0x4000
Craig Tiller20afa3d2016-10-17 14:52:14 -0700118
119 grpc_arg arg;
Yash Tibrewal40422d52017-11-06 14:39:17 -0800120 arg.key = const_cast<char*>(GRPC_ARG_RESOURCE_QUOTA);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700121 arg.type = GRPC_ARG_POINTER;
122 arg.value.pointer.p = resource_quota;
123 arg.value.pointer.vtable = grpc_resource_quota_arg_vtable();
124 grpc_channel_args args = {1, &arg};
125
126 grpc_end2end_test_fixture f =
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800127 begin_test(config, "resource_quota_server", nullptr, &args);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700128
129 /* Create large request and response bodies. These are big enough to require
130 * multiple round trips to deliver to the peer, and their exact contents of
131 * will be verified on completion. */
Craig Tillerd41a4a72016-10-26 16:16:06 -0700132 grpc_slice request_payload_slice = generate_random_slice();
Craig Tiller20afa3d2016-10-17 14:52:14 -0700133
Craig Tillerbaa14a92017-11-03 09:09:36 -0700134 grpc_call** client_calls =
135 (grpc_call**)malloc(sizeof(grpc_call*) * NUM_CALLS);
136 grpc_call** server_calls =
137 (grpc_call**)malloc(sizeof(grpc_call*) * NUM_CALLS);
138 grpc_metadata_array* initial_metadata_recv =
139 (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
140 grpc_metadata_array* trailing_metadata_recv =
141 (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
142 grpc_metadata_array* request_metadata_recv =
143 (grpc_metadata_array*)malloc(sizeof(grpc_metadata_array) * NUM_CALLS);
144 grpc_call_details* call_details =
145 (grpc_call_details*)malloc(sizeof(grpc_call_details) * NUM_CALLS);
146 grpc_status_code* status =
147 (grpc_status_code*)malloc(sizeof(grpc_status_code) * NUM_CALLS);
148 grpc_slice* details = (grpc_slice*)malloc(sizeof(grpc_slice) * NUM_CALLS);
149 grpc_byte_buffer** request_payload =
150 (grpc_byte_buffer**)malloc(sizeof(grpc_byte_buffer*) * NUM_CALLS);
151 grpc_byte_buffer** request_payload_recv =
152 (grpc_byte_buffer**)malloc(sizeof(grpc_byte_buffer*) * NUM_CALLS);
153 int* was_cancelled = (int*)malloc(sizeof(int) * NUM_CALLS);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700154 grpc_call_error error;
155 int pending_client_calls = 0;
156 int pending_server_start_calls = 0;
157 int pending_server_recv_calls = 0;
158 int pending_server_end_calls = 0;
159 int cancelled_calls_on_client = 0;
160 int cancelled_calls_on_server = 0;
Craig Tiller1a5ead32017-01-30 14:27:21 -0800161 int deadline_exceeded = 0;
Craig Tiller78e08642017-04-24 08:14:23 -0700162 int unavailable = 0;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700163
Craig Tiller20afa3d2016-10-17 14:52:14 -0700164 grpc_op ops[6];
Craig Tillerbaa14a92017-11-03 09:09:36 -0700165 grpc_op* op;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700166
167 for (int i = 0; i < NUM_CALLS; i++) {
168 grpc_metadata_array_init(&initial_metadata_recv[i]);
169 grpc_metadata_array_init(&trailing_metadata_recv[i]);
170 grpc_metadata_array_init(&request_metadata_recv[i]);
171 grpc_call_details_init(&call_details[i]);
Ken Payson567e0f12017-08-29 09:21:22 -0700172 request_payload[i] = grpc_raw_byte_buffer_create(&request_payload_slice, 1);
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800173 request_payload_recv[i] = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700174 was_cancelled[i] = 0;
175 }
176
177 for (int i = 0; i < NUM_CALLS; i++) {
178 error = grpc_server_request_call(
179 f.server, &server_calls[i], &call_details[i], &request_metadata_recv[i],
180 f.cq, f.cq, tag(SERVER_START_BASE_TAG + i));
181 GPR_ASSERT(GRPC_CALL_OK == error);
182
183 pending_server_start_calls++;
184 }
185
186 for (int i = 0; i < NUM_CALLS; i++) {
187 client_calls[i] = grpc_channel_create_call(
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800188 f.client, nullptr, GRPC_PROPAGATE_DEFAULTS, f.cq,
Craig Tiller7c70b6c2017-01-23 07:48:42 -0800189 grpc_slice_from_static_string("/foo"),
190 get_host_override_slice("foo.test.google.fr", config),
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800191 n_seconds_from_now(60), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700192
193 memset(ops, 0, sizeof(ops));
194 op = ops;
195 op->op = GRPC_OP_SEND_INITIAL_METADATA;
196 op->data.send_initial_metadata.count = 0;
Craig Tiller9b3d3912017-04-13 16:41:14 +0000197 op->flags = GRPC_INITIAL_METADATA_WAIT_FOR_READY;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800198 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700199 op++;
200 op->op = GRPC_OP_SEND_MESSAGE;
Ken Payson567e0f12017-08-29 09:21:22 -0700201 op->data.send_message.send_message = request_payload[i];
Craig Tiller20afa3d2016-10-17 14:52:14 -0700202 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800203 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700204 op++;
205 op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
206 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800207 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700208 op++;
209 op->op = GRPC_OP_RECV_INITIAL_METADATA;
Mark D. Roth435f9f22017-01-25 12:53:54 -0800210 op->data.recv_initial_metadata.recv_initial_metadata =
211 &initial_metadata_recv[i];
Craig Tiller20afa3d2016-10-17 14:52:14 -0700212 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800213 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700214 op++;
215 op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
216 op->data.recv_status_on_client.trailing_metadata =
217 &trailing_metadata_recv[i];
218 op->data.recv_status_on_client.status = &status[i];
219 op->data.recv_status_on_client.status_details = &details[i];
Craig Tiller20afa3d2016-10-17 14:52:14 -0700220 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800221 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700222 op++;
223 error = grpc_call_start_batch(client_calls[i], ops, (size_t)(op - ops),
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800224 tag(CLIENT_BASE_TAG + i), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700225 GPR_ASSERT(GRPC_CALL_OK == error);
226
227 pending_client_calls++;
228 }
229
230 while (pending_client_calls + pending_server_recv_calls +
231 pending_server_end_calls >
232 0) {
Chris Evansed2a5472017-03-27 17:34:51 -0500233 grpc_event ev =
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800234 grpc_completion_queue_next(f.cq, n_seconds_from_now(60), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700235 GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
236
237 int ev_tag = (int)(intptr_t)ev.tag;
238 if (ev_tag < CLIENT_BASE_TAG) {
239 abort(); /* illegal tag */
240 } else if (ev_tag < SERVER_START_BASE_TAG) {
241 /* client call finished */
242 int call_id = ev_tag - CLIENT_BASE_TAG;
243 GPR_ASSERT(call_id >= 0);
244 GPR_ASSERT(call_id < NUM_CALLS);
245 switch (status[call_id]) {
246 case GRPC_STATUS_RESOURCE_EXHAUSTED:
247 cancelled_calls_on_client++;
248 break;
Craig Tiller1a5ead32017-01-30 14:27:21 -0800249 case GRPC_STATUS_DEADLINE_EXCEEDED:
250 deadline_exceeded++;
251 break;
Craig Tiller78e08642017-04-24 08:14:23 -0700252 case GRPC_STATUS_UNAVAILABLE:
253 unavailable++;
254 break;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700255 case GRPC_STATUS_OK:
256 break;
257 default:
258 gpr_log(GPR_ERROR, "Unexpected status code: %d", status[call_id]);
259 abort();
260 }
261 GPR_ASSERT(pending_client_calls > 0);
262
263 grpc_metadata_array_destroy(&initial_metadata_recv[call_id]);
264 grpc_metadata_array_destroy(&trailing_metadata_recv[call_id]);
Craig Tillerdd36b152017-03-31 08:27:28 -0700265 grpc_call_unref(client_calls[call_id]);
Craig Tiller7c70b6c2017-01-23 07:48:42 -0800266 grpc_slice_unref(details[call_id]);
Ken Payson567e0f12017-08-29 09:21:22 -0700267 grpc_byte_buffer_destroy(request_payload[call_id]);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700268
269 pending_client_calls--;
270 } else if (ev_tag < SERVER_RECV_BASE_TAG) {
271 /* new incoming call to the server */
272 int call_id = ev_tag - SERVER_START_BASE_TAG;
273 GPR_ASSERT(call_id >= 0);
274 GPR_ASSERT(call_id < NUM_CALLS);
275
276 memset(ops, 0, sizeof(ops));
277 op = ops;
278 op->op = GRPC_OP_SEND_INITIAL_METADATA;
279 op->data.send_initial_metadata.count = 0;
280 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800281 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700282 op++;
283 op->op = GRPC_OP_RECV_MESSAGE;
Mark D. Roth435f9f22017-01-25 12:53:54 -0800284 op->data.recv_message.recv_message = &request_payload_recv[call_id];
Craig Tiller20afa3d2016-10-17 14:52:14 -0700285 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800286 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700287 op++;
288 error =
289 grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops),
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800290 tag(SERVER_RECV_BASE_TAG + call_id), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700291 GPR_ASSERT(GRPC_CALL_OK == error);
292
293 GPR_ASSERT(pending_server_start_calls > 0);
294 pending_server_start_calls--;
295 pending_server_recv_calls++;
296
297 grpc_call_details_destroy(&call_details[call_id]);
298 grpc_metadata_array_destroy(&request_metadata_recv[call_id]);
299 } else if (ev_tag < SERVER_END_BASE_TAG) {
300 /* finished read on the server */
301 int call_id = ev_tag - SERVER_RECV_BASE_TAG;
302 GPR_ASSERT(call_id >= 0);
303 GPR_ASSERT(call_id < NUM_CALLS);
304
305 if (ev.success) {
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800306 if (request_payload_recv[call_id] != nullptr) {
Craig Tiller20afa3d2016-10-17 14:52:14 -0700307 grpc_byte_buffer_destroy(request_payload_recv[call_id]);
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800308 request_payload_recv[call_id] = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700309 }
310 } else {
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800311 GPR_ASSERT(request_payload_recv[call_id] == nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700312 }
313
314 memset(ops, 0, sizeof(ops));
315 op = ops;
316 op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
317 op->data.recv_close_on_server.cancelled = &was_cancelled[call_id];
318 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800319 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700320 op++;
321 op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
322 op->data.send_status_from_server.trailing_metadata_count = 0;
323 op->data.send_status_from_server.status = GRPC_STATUS_OK;
Craig Tiller7c70b6c2017-01-23 07:48:42 -0800324 grpc_slice status_details = grpc_slice_from_static_string("xyz");
325 op->data.send_status_from_server.status_details = &status_details;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700326 op->flags = 0;
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800327 op->reserved = nullptr;
Craig Tiller20afa3d2016-10-17 14:52:14 -0700328 op++;
329 error =
330 grpc_call_start_batch(server_calls[call_id], ops, (size_t)(op - ops),
Craig Tiller4ac2b8e2017-11-10 14:14:17 -0800331 tag(SERVER_END_BASE_TAG + call_id), nullptr);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700332 GPR_ASSERT(GRPC_CALL_OK == error);
333
334 GPR_ASSERT(pending_server_recv_calls > 0);
335 pending_server_recv_calls--;
336 pending_server_end_calls++;
337 } else {
338 int call_id = ev_tag - SERVER_END_BASE_TAG;
339 GPR_ASSERT(call_id >= 0);
340 GPR_ASSERT(call_id < NUM_CALLS);
341
342 if (was_cancelled[call_id]) {
343 cancelled_calls_on_server++;
344 }
345 GPR_ASSERT(pending_server_end_calls > 0);
346 pending_server_end_calls--;
347
Craig Tillerdd36b152017-03-31 08:27:28 -0700348 grpc_call_unref(server_calls[call_id]);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700349 }
350 }
351
Craig Tiller1a5ead32017-01-30 14:27:21 -0800352 gpr_log(GPR_INFO,
353 "Done. %d total calls: %d cancelled at server, %d cancelled at "
Craig Tiller78e08642017-04-24 08:14:23 -0700354 "client, %d timed out, %d unavailable.",
Craig Tiller1a5ead32017-01-30 14:27:21 -0800355 NUM_CALLS, cancelled_calls_on_server, cancelled_calls_on_client,
Craig Tiller78e08642017-04-24 08:14:23 -0700356 deadline_exceeded, unavailable);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700357
Craig Tillerd41a4a72016-10-26 16:16:06 -0700358 grpc_slice_unref(request_payload_slice);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700359 grpc_resource_quota_unref(resource_quota);
360
Craig Tillereb468162017-02-02 08:37:22 -0800361 end_test(&f);
362 config.tear_down_data(&f);
363
Masood Malekghassemi5a400572016-10-31 17:20:15 -0700364 free(client_calls);
365 free(server_calls);
366 free(initial_metadata_recv);
367 free(trailing_metadata_recv);
368 free(request_metadata_recv);
369 free(call_details);
370 free(status);
371 free(details);
Ken Payson567e0f12017-08-29 09:21:22 -0700372 free(request_payload);
Masood Malekghassemi5a400572016-10-31 17:20:15 -0700373 free(request_payload_recv);
374 free(was_cancelled);
Craig Tiller20afa3d2016-10-17 14:52:14 -0700375}
376
377void resource_quota_server_pre_init(void) {}