blob: 57300a01913b800fb03b15aee1356dec86c7d498 [file] [log] [blame]
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08001/*
2 *
Craig Tiller06059952015-02-18 08:34:56 -08003 * Copyright 2015, Google Inc.
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -08004 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * * Redistributions in binary form must reproduce the above
13 * copyright notice, this list of conditions and the following disclaimer
14 * in the documentation and/or other materials provided with the
15 * distribution.
16 * * Neither the name of Google Inc. nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33
34#include "test/core/end2end/end2end_tests.h"
35
36#include <stdio.h>
37#include <string.h>
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080038
39#include <grpc/byte_buffer.h>
40#include <grpc/support/alloc.h>
41#include <grpc/support/log.h>
42#include <grpc/support/time.h>
43#include <grpc/support/useful.h>
44#include "test/core/end2end/cq_verifier.h"
45
46enum { TIMEOUT = 200000 };
47
48static void *tag(gpr_intptr t) { return (void *)t; }
49
50static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config,
51 const char *test_name,
52 grpc_channel_args *client_args,
53 grpc_channel_args *server_args) {
54 grpc_end2end_test_fixture f;
55 gpr_log(GPR_INFO, "%s/%s", test_name, config.name);
56 f = config.create_fixture(client_args, server_args);
57 config.init_client(&f, client_args);
58 config.init_server(&f, server_args);
59 return f;
60}
61
62static gpr_timespec n_seconds_time(int n) {
Craig Tiller8ad8a412015-02-25 08:36:40 -080063 return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080064}
65
Craig Tiller32946d32015-01-15 11:37:30 -080066static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); }
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080067
68static void drain_cq(grpc_completion_queue *cq) {
Craig Tiller64be9f72015-05-04 14:53:51 -070069 grpc_event ev;
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080070 do {
71 ev = grpc_completion_queue_next(cq, five_seconds_time());
Craig Tiller64be9f72015-05-04 14:53:51 -070072 } while (ev.type != GRPC_QUEUE_SHUTDOWN);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080073}
74
75static void shutdown_server(grpc_end2end_test_fixture *f) {
76 if (!f->server) return;
77 grpc_server_shutdown(f->server);
78 grpc_server_destroy(f->server);
79 f->server = NULL;
80}
81
82static void shutdown_client(grpc_end2end_test_fixture *f) {
83 if (!f->client) return;
84 grpc_channel_destroy(f->client);
85 f->client = NULL;
86}
87
88static void end_test(grpc_end2end_test_fixture *f) {
89 shutdown_server(f);
90 shutdown_client(f);
91
Craig Tillerbc0ec332015-05-11 12:11:32 -070092 grpc_completion_queue_shutdown(f->cq);
93 drain_cq(f->cq);
94 grpc_completion_queue_destroy(f->cq);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -080095}
96
97static void simple_request_body(grpc_end2end_test_fixture f) {
98 grpc_call *c;
99 grpc_call *s;
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800100 gpr_timespec deadline = five_seconds_time();
Craig Tillerbc0ec332015-05-11 12:11:32 -0700101 cq_verifier *cqv = cq_verifier_create(f.cq);
Craig Tiller8b1d9892015-04-28 14:28:19 -0700102 grpc_op ops[6];
103 grpc_op *op;
104 grpc_metadata_array initial_metadata_recv;
105 grpc_metadata_array trailing_metadata_recv;
106 grpc_metadata_array request_metadata_recv;
107 grpc_call_details call_details;
108 grpc_status_code status;
109 char *details = NULL;
110 size_t details_capacity = 0;
111 int was_cancelled = 2;
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800112
Craig Tillerbc0ec332015-05-11 12:11:32 -0700113 c = grpc_channel_create_call(f.client, f.cq, "/foo",
Craig Tiller8b1d9892015-04-28 14:28:19 -0700114 "foo.test.google.fr:1234", deadline);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800115 GPR_ASSERT(c);
116
Craig Tiller8b1d9892015-04-28 14:28:19 -0700117 grpc_metadata_array_init(&initial_metadata_recv);
118 grpc_metadata_array_init(&trailing_metadata_recv);
119 grpc_metadata_array_init(&request_metadata_recv);
120 grpc_call_details_init(&call_details);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800121
Craig Tiller8b1d9892015-04-28 14:28:19 -0700122 op = ops;
123 op->op = GRPC_OP_SEND_INITIAL_METADATA;
124 op->data.send_initial_metadata.count = 0;
125 op++;
126 op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
127 op++;
128 op->op = GRPC_OP_RECV_INITIAL_METADATA;
129 op->data.recv_initial_metadata = &initial_metadata_recv;
130 op++;
131 op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
132 op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv;
133 op->data.recv_status_on_client.status = &status;
134 op->data.recv_status_on_client.status_details = &details;
135 op->data.recv_status_on_client.status_details_capacity = &details_capacity;
136 op++;
137 GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, op - ops, tag(1)));
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800138
Craig Tillerf9e6adf2015-05-06 11:45:59 -0700139 GPR_ASSERT(GRPC_CALL_OK ==
140 grpc_server_request_call(f.server, &s, &call_details,
Craig Tillerbc0ec332015-05-11 12:11:32 -0700141 &request_metadata_recv, f.cq,
142 f.cq, tag(101)));
Craig Tillera0a6b122015-05-12 14:42:27 -0700143 cq_expect_completion(cqv, tag(101), 1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700144 cq_verify(cqv);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800145
Craig Tiller8b1d9892015-04-28 14:28:19 -0700146 op = ops;
147 op->op = GRPC_OP_SEND_INITIAL_METADATA;
148 op->data.send_initial_metadata.count = 0;
149 op++;
150 op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
151 op->data.send_status_from_server.trailing_metadata_count = 0;
152 op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
153 op->data.send_status_from_server.status_details = "xyz";
154 op++;
155 op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
156 op->data.recv_close_on_server.cancelled = &was_cancelled;
157 op++;
158 GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(s, ops, op - ops, tag(102)));
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800159
Craig Tillera0a6b122015-05-12 14:42:27 -0700160 cq_expect_completion(cqv, tag(102), 1);
161 cq_expect_completion(cqv, tag(1), 1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700162 cq_verify(cqv);
Craig Tiller8b1d9892015-04-28 14:28:19 -0700163
164 GPR_ASSERT(status == GRPC_STATUS_UNIMPLEMENTED);
165 GPR_ASSERT(0 == strcmp(details, "xyz"));
166 GPR_ASSERT(0 == strcmp(call_details.method, "/foo"));
167 GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr:1234"));
168 GPR_ASSERT(was_cancelled == 0);
169
170 gpr_free(details);
171 grpc_metadata_array_destroy(&initial_metadata_recv);
172 grpc_metadata_array_destroy(&trailing_metadata_recv);
173 grpc_metadata_array_destroy(&request_metadata_recv);
174 grpc_call_details_destroy(&call_details);
175
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800176 grpc_call_destroy(c);
177 grpc_call_destroy(s);
178
Craig Tillerbc0ec332015-05-11 12:11:32 -0700179 cq_verifier_destroy(cqv);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800180}
181
182static void test_max_concurrent_streams(grpc_end2end_test_config config) {
183 grpc_end2end_test_fixture f;
184 grpc_arg server_arg;
185 grpc_channel_args server_args;
186 grpc_call *c1;
187 grpc_call *c2;
188 grpc_call *s1;
189 grpc_call *s2;
ctiller58393c22015-01-07 14:03:30 -0800190 int live_call;
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800191 gpr_timespec deadline;
Craig Tillerbc0ec332015-05-11 12:11:32 -0700192 cq_verifier *cqv;
Craig Tiller64be9f72015-05-04 14:53:51 -0700193 grpc_event ev;
Craig Tiller3b05a122015-04-28 15:14:40 -0700194 grpc_call_details call_details;
195 grpc_metadata_array request_metadata_recv;
196 grpc_metadata_array initial_metadata_recv1;
197 grpc_metadata_array trailing_metadata_recv1;
198 grpc_metadata_array initial_metadata_recv2;
199 grpc_metadata_array trailing_metadata_recv2;
200 grpc_status_code status1;
201 char *details1 = NULL;
202 size_t details_capacity1 = 0;
203 grpc_status_code status2;
204 char *details2 = NULL;
205 size_t details_capacity2 = 0;
Craig Tillerfe2b8352015-04-28 15:46:50 -0700206 grpc_op ops[6];
207 grpc_op *op;
208 int was_cancelled;
Craig Tiller4a716002015-05-11 14:31:58 -0700209 int got_client_start;
210 int got_server_start;
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800211
212 server_arg.key = GRPC_ARG_MAX_CONCURRENT_STREAMS;
213 server_arg.type = GRPC_ARG_INTEGER;
214 server_arg.value.integer = 1;
215
216 server_args.num_args = 1;
217 server_args.args = &server_arg;
218
219 f = begin_test(config, __FUNCTION__, NULL, &server_args);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700220 cqv = cq_verifier_create(f.cq);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800221
Craig Tiller3b05a122015-04-28 15:14:40 -0700222 grpc_metadata_array_init(&request_metadata_recv);
Craig Tillerf1071202015-04-30 13:29:48 -0700223 grpc_metadata_array_init(&initial_metadata_recv1);
224 grpc_metadata_array_init(&trailing_metadata_recv1);
225 grpc_metadata_array_init(&initial_metadata_recv2);
226 grpc_metadata_array_init(&trailing_metadata_recv2);
227 grpc_call_details_init(&call_details);
Craig Tiller3b05a122015-04-28 15:14:40 -0700228
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800229 /* perform a ping-pong to ensure that settings have had a chance to round
230 trip */
231 simple_request_body(f);
232 /* perform another one to make sure that the one stream case still works */
233 simple_request_body(f);
234
235 /* start two requests - ensuring that the second is not accepted until
236 the first completes */
Craig Tiller4a716002015-05-11 14:31:58 -0700237 deadline = n_seconds_time(1000);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700238 c1 = grpc_channel_create_call(f.client, f.cq, "/alpha",
Craig Tiller9f3675f2015-04-29 13:56:33 -0700239 "foo.test.google.fr:1234", deadline);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800240 GPR_ASSERT(c1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700241 c2 = grpc_channel_create_call(f.client, f.cq, "/beta",
Craig Tiller9f3675f2015-04-29 13:56:33 -0700242 "foo.test.google.fr:1234", deadline);
Craig Tiller3b05a122015-04-28 15:14:40 -0700243 GPR_ASSERT(c2);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800244
Craig Tillerf9e6adf2015-05-06 11:45:59 -0700245 GPR_ASSERT(GRPC_CALL_OK ==
246 grpc_server_request_call(f.server, &s1, &call_details,
Craig Tillerbc0ec332015-05-11 12:11:32 -0700247 &request_metadata_recv, f.cq,
248 f.cq, tag(101)));
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800249
Craig Tiller3b05a122015-04-28 15:14:40 -0700250 op = ops;
251 op->op = GRPC_OP_SEND_INITIAL_METADATA;
252 op->data.send_initial_metadata.count = 0;
253 op++;
254 op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
255 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700256 GPR_ASSERT(GRPC_CALL_OK ==
257 grpc_call_start_batch(c1, ops, op - ops, tag(301)));
Craig Tiller3b05a122015-04-28 15:14:40 -0700258
259 op = ops;
260 op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
Craig Tillerfe2b8352015-04-28 15:46:50 -0700261 op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv1;
262 op->data.recv_status_on_client.status = &status1;
263 op->data.recv_status_on_client.status_details = &details1;
264 op->data.recv_status_on_client.status_details_capacity = &details_capacity1;
Craig Tiller3b05a122015-04-28 15:14:40 -0700265 op++;
Craig Tiller06eb5ae2015-04-30 13:48:58 -0700266 op->op = GRPC_OP_RECV_INITIAL_METADATA;
267 op->data.recv_initial_metadata = &initial_metadata_recv1;
268 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700269 GPR_ASSERT(GRPC_CALL_OK ==
270 grpc_call_start_batch(c1, ops, op - ops, tag(302)));
Craig Tiller3b05a122015-04-28 15:14:40 -0700271
272 op = ops;
273 op->op = GRPC_OP_SEND_INITIAL_METADATA;
274 op->data.send_initial_metadata.count = 0;
275 op++;
276 op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
277 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700278 GPR_ASSERT(GRPC_CALL_OK ==
279 grpc_call_start_batch(c2, ops, op - ops, tag(401)));
Craig Tiller3b05a122015-04-28 15:14:40 -0700280
281 op = ops;
282 op->op = GRPC_OP_RECV_STATUS_ON_CLIENT;
Craig Tillerfe2b8352015-04-28 15:46:50 -0700283 op->data.recv_status_on_client.trailing_metadata = &trailing_metadata_recv2;
284 op->data.recv_status_on_client.status = &status2;
285 op->data.recv_status_on_client.status_details = &details2;
286 op->data.recv_status_on_client.status_details_capacity = &details_capacity2;
Craig Tiller3b05a122015-04-28 15:14:40 -0700287 op++;
Craig Tiller06eb5ae2015-04-30 13:48:58 -0700288 op->op = GRPC_OP_RECV_INITIAL_METADATA;
289 op->data.recv_initial_metadata = &initial_metadata_recv1;
290 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700291 GPR_ASSERT(GRPC_CALL_OK ==
292 grpc_call_start_batch(c2, ops, op - ops, tag(402)));
Craig Tiller80fa15c2015-01-13 16:10:49 -0800293
Craig Tiller4a716002015-05-11 14:31:58 -0700294 got_client_start = 0;
295 got_server_start = 0;
Craig Tillera0a6b122015-05-12 14:42:27 -0700296 live_call = -1;
Craig Tiller4a716002015-05-11 14:31:58 -0700297 while (!got_client_start || !got_server_start) {
298 ev = grpc_completion_queue_next(f.cq,
299 GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3));
Craig Tillera0a6b122015-05-12 14:42:27 -0700300 GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
301 GPR_ASSERT(ev.success);
302 if (ev.tag == tag(101)) {
Craig Tiller4a716002015-05-11 14:31:58 -0700303 GPR_ASSERT(!got_server_start);
304 got_server_start = 1;
305 } else {
306 GPR_ASSERT(!got_client_start);
Craig Tillera0a6b122015-05-12 14:42:27 -0700307 GPR_ASSERT(ev.tag == tag(301) || ev.tag == tag(401));
Craig Tiller4a716002015-05-11 14:31:58 -0700308 /* The /alpha or /beta calls started above could be invoked (but NOT both);
309 * check this here */
310 /* We'll get tag 303 or 403, we want 300, 400 */
Craig Tillera0a6b122015-05-12 14:42:27 -0700311 live_call = ((int)(gpr_intptr)ev.tag) - 1;
Craig Tiller4a716002015-05-11 14:31:58 -0700312 got_client_start = 1;
313 }
Craig Tiller4a716002015-05-11 14:31:58 -0700314 }
Craig Tillera0a6b122015-05-12 14:42:27 -0700315 GPR_ASSERT(live_call == 300 || live_call == 400);
ctiller58393c22015-01-07 14:03:30 -0800316
Craig Tiller3b05a122015-04-28 15:14:40 -0700317 op = ops;
318 op->op = GRPC_OP_SEND_INITIAL_METADATA;
319 op->data.send_initial_metadata.count = 0;
320 op++;
321 op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
322 op->data.recv_close_on_server.cancelled = &was_cancelled;
323 op++;
Craig Tiller3b05a122015-04-28 15:14:40 -0700324 op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
325 op->data.send_status_from_server.trailing_metadata_count = 0;
326 op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
327 op->data.send_status_from_server.status_details = "xyz";
328 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700329 GPR_ASSERT(GRPC_CALL_OK ==
Craig Tiller06eb5ae2015-04-30 13:48:58 -0700330 grpc_call_start_batch(s1, ops, op - ops, tag(102)));
Craig Tiller3b05a122015-04-28 15:14:40 -0700331
Craig Tillera0a6b122015-05-12 14:42:27 -0700332 cq_expect_completion(cqv, tag(102), 1);
333 cq_expect_completion(cqv, tag(live_call + 2), 1);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800334 /* first request is finished, we should be able to start the second */
Craig Tillerbf444932015-01-13 17:13:08 -0800335 live_call = (live_call == 300) ? 400 : 300;
Craig Tillera0a6b122015-05-12 14:42:27 -0700336 cq_expect_completion(cqv, tag(live_call + 1), 1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700337 cq_verify(cqv);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800338
Craig Tillerf9e6adf2015-05-06 11:45:59 -0700339 GPR_ASSERT(GRPC_CALL_OK ==
340 grpc_server_request_call(f.server, &s2, &call_details,
Craig Tillerbc0ec332015-05-11 12:11:32 -0700341 &request_metadata_recv, f.cq,
342 f.cq, tag(201)));
Craig Tillera0a6b122015-05-12 14:42:27 -0700343 cq_expect_completion(cqv, tag(201), 1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700344 cq_verify(cqv);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800345
Craig Tiller3b05a122015-04-28 15:14:40 -0700346 op = ops;
347 op->op = GRPC_OP_SEND_INITIAL_METADATA;
348 op->data.send_initial_metadata.count = 0;
349 op++;
350 op->op = GRPC_OP_RECV_CLOSE_ON_SERVER;
351 op->data.recv_close_on_server.cancelled = &was_cancelled;
352 op++;
Craig Tillerfe2b8352015-04-28 15:46:50 -0700353 op->op = GRPC_OP_SEND_STATUS_FROM_SERVER;
354 op->data.send_status_from_server.trailing_metadata_count = 0;
355 op->data.send_status_from_server.status = GRPC_STATUS_UNIMPLEMENTED;
356 op->data.send_status_from_server.status_details = "xyz";
357 op++;
Craig Tiller9f3675f2015-04-29 13:56:33 -0700358 GPR_ASSERT(GRPC_CALL_OK ==
Craig Tiller06eb5ae2015-04-30 13:48:58 -0700359 grpc_call_start_batch(s2, ops, op - ops, tag(202)));
360
Craig Tillera0a6b122015-05-12 14:42:27 -0700361 cq_expect_completion(cqv, tag(live_call + 2), 1);
362 cq_expect_completion(cqv, tag(202), 1);
Craig Tillerbc0ec332015-05-11 12:11:32 -0700363 cq_verify(cqv);
Craig Tillerfe2b8352015-04-28 15:46:50 -0700364
Craig Tillerbc0ec332015-05-11 12:11:32 -0700365 cq_verifier_destroy(cqv);
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800366
367 grpc_call_destroy(c1);
368 grpc_call_destroy(s1);
369 grpc_call_destroy(c2);
370 grpc_call_destroy(s2);
371
Craig Tiller5fe7e5d2015-05-01 10:52:35 -0700372 gpr_free(details1);
373 gpr_free(details2);
374 grpc_metadata_array_destroy(&initial_metadata_recv1);
375 grpc_metadata_array_destroy(&trailing_metadata_recv1);
376 grpc_metadata_array_destroy(&initial_metadata_recv2);
377 grpc_metadata_array_destroy(&trailing_metadata_recv2);
378 grpc_metadata_array_destroy(&request_metadata_recv);
379 grpc_call_details_destroy(&call_details);
380
Nicolas Nobleb7ebd3b2014-11-26 16:33:03 -0800381 end_test(&f);
382 config.tear_down_data(&f);
383}
384
385void grpc_end2end_tests(grpc_end2end_test_config config) {
386 test_max_concurrent_streams(config);
Craig Tiller190d3602015-02-18 09:23:38 -0800387}