Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
0caaea10
Commit
0caaea10
authored
Jan 30, 2017
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Review feedback, merging with latest changes
parent
1ce0e4f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/core/end2end/tests/max_concurrent_streams.c
+36
-33
36 additions, 33 deletions
test/core/end2end/tests/max_concurrent_streams.c
with
36 additions
and
33 deletions
test/core/end2end/tests/max_concurrent_streams.c
+
36
−
33
View file @
0caaea10
...
@@ -465,11 +465,9 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -465,11 +465,9 @@ static void test_max_concurrent_streams_with_timeout_on_first(
grpc_metadata_array
trailing_metadata_recv2
;
grpc_metadata_array
trailing_metadata_recv2
;
grpc_status_code
status1
;
grpc_status_code
status1
;
grpc_call_error
error
;
grpc_call_error
error
;
char
*
details1
=
NULL
;
grpc_slice
details1
=
grpc_empty_slice
();
size_t
details_capacity1
=
0
;
grpc_status_code
status2
;
grpc_status_code
status2
;
char
*
details2
=
NULL
;
grpc_slice
details2
=
grpc_empty_slice
();
size_t
details_capacity2
=
0
;
grpc_op
ops
[
6
];
grpc_op
ops
[
6
];
grpc_op
*
op
;
grpc_op
*
op
;
int
was_cancelled
;
int
was_cancelled
;
...
@@ -501,13 +499,15 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -501,13 +499,15 @@ static void test_max_concurrent_streams_with_timeout_on_first(
/* start two requests - ensuring that the second is not accepted until
/* start two requests - ensuring that the second is not accepted until
the first completes */
the first completes */
c1
=
grpc_channel_create_call
(
c1
=
grpc_channel_create_call
(
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
"/alpha"
,
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
get_host_override_string
(
"foo.test.google.fr:1234"
,
config
),
grpc_slice_from_static_string
(
"/alpha"
),
get_host_override_slice
(
"foo.test.google.fr:1234"
,
config
),
n_seconds_time
(
3
),
NULL
);
n_seconds_time
(
3
),
NULL
);
GPR_ASSERT
(
c1
);
GPR_ASSERT
(
c1
);
c2
=
grpc_channel_create_call
(
c2
=
grpc_channel_create_call
(
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
"/beta"
,
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
get_host_override_string
(
"foo.test.google.fr:1234"
,
config
),
grpc_slice_from_static_string
(
"/beta"
),
get_host_override_slice
(
"foo.test.google.fr:1234"
,
config
),
n_seconds_time
(
1000
),
NULL
);
n_seconds_time
(
1000
),
NULL
);
GPR_ASSERT
(
c2
);
GPR_ASSERT
(
c2
);
...
@@ -535,12 +535,12 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -535,12 +535,12 @@ static void test_max_concurrent_streams_with_timeout_on_first(
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv1
;
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv1
;
op
->
data
.
recv_status_on_client
.
status
=
&
status1
;
op
->
data
.
recv_status_on_client
.
status
=
&
status1
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details1
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details1
;
op
->
data
.
recv_status_on_client
.
status_details_capacity
=
&
details_capacity1
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
data
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
data
.
recv_initial_metadata
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -571,12 +571,12 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -571,12 +571,12 @@ static void test_max_concurrent_streams_with_timeout_on_first(
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv2
;
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv2
;
op
->
data
.
recv_status_on_client
.
status
=
&
status2
;
op
->
data
.
recv_status_on_client
.
status
=
&
status2
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details2
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details2
;
op
->
data
.
recv_status_on_client
.
status_details_capacity
=
&
details_capacity2
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
data
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
data
.
recv_initial_metadata
.
recv_initial_metadata
=
&
initial_metadata_recv2
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -608,7 +608,8 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -608,7 +608,8 @@ static void test_max_concurrent_streams_with_timeout_on_first(
op
->
op
=
GRPC_OP_SEND_STATUS_FROM_SERVER
;
op
->
op
=
GRPC_OP_SEND_STATUS_FROM_SERVER
;
op
->
data
.
send_status_from_server
.
trailing_metadata_count
=
0
;
op
->
data
.
send_status_from_server
.
trailing_metadata_count
=
0
;
op
->
data
.
send_status_from_server
.
status
=
GRPC_STATUS_UNIMPLEMENTED
;
op
->
data
.
send_status_from_server
.
status
=
GRPC_STATUS_UNIMPLEMENTED
;
op
->
data
.
send_status_from_server
.
status_details
=
"xyz"
;
grpc_slice
status_details
=
grpc_slice_from_static_string
(
"xyz"
);
op
->
data
.
send_status_from_server
.
status_details
=
&
status_details
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -626,8 +627,8 @@ static void test_max_concurrent_streams_with_timeout_on_first(
...
@@ -626,8 +627,8 @@ static void test_max_concurrent_streams_with_timeout_on_first(
grpc_call_destroy
(
c2
);
grpc_call_destroy
(
c2
);
grpc_call_destroy
(
s2
);
grpc_call_destroy
(
s2
);
g
pr_free
(
details1
);
g
rpc_slice_unref
(
details1
);
g
pr_free
(
details2
);
g
rpc_slice_unref
(
details2
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv1
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv1
);
grpc_metadata_array_destroy
(
&
trailing_metadata_recv1
);
grpc_metadata_array_destroy
(
&
trailing_metadata_recv1
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv2
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv2
);
...
@@ -647,7 +648,6 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -647,7 +648,6 @@ static void test_max_concurrent_streams_with_timeout_on_second(
grpc_call
*
c1
;
grpc_call
*
c1
;
grpc_call
*
c2
;
grpc_call
*
c2
;
grpc_call
*
s1
;
grpc_call
*
s1
;
// grpc_call *s2;
cq_verifier
*
cqv
;
cq_verifier
*
cqv
;
grpc_call_details
call_details
;
grpc_call_details
call_details
;
grpc_metadata_array
request_metadata_recv
;
grpc_metadata_array
request_metadata_recv
;
...
@@ -657,11 +657,9 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -657,11 +657,9 @@ static void test_max_concurrent_streams_with_timeout_on_second(
grpc_metadata_array
trailing_metadata_recv2
;
grpc_metadata_array
trailing_metadata_recv2
;
grpc_status_code
status1
;
grpc_status_code
status1
;
grpc_call_error
error
;
grpc_call_error
error
;
char
*
details1
=
NULL
;
grpc_slice
details1
=
grpc_empty_slice
();
size_t
details_capacity1
=
0
;
grpc_status_code
status2
;
grpc_status_code
status2
;
char
*
details2
=
NULL
;
grpc_slice
details2
=
grpc_empty_slice
();
size_t
details_capacity2
=
0
;
grpc_op
ops
[
6
];
grpc_op
ops
[
6
];
grpc_op
*
op
;
grpc_op
*
op
;
int
was_cancelled
;
int
was_cancelled
;
...
@@ -693,12 +691,16 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -693,12 +691,16 @@ static void test_max_concurrent_streams_with_timeout_on_second(
/* start two requests - ensuring that the second is not accepted until
/* start two requests - ensuring that the second is not accepted until
the first completes , and the second request will timeout in the
the first completes , and the second request will timeout in the
concurrent_list */
concurrent_list */
c1
=
grpc_channel_create_call
(
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
c1
=
grpc_channel_create_call
(
"/alpha"
,
"foo.test.google.fr:1234"
,
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
grpc_slice_from_static_string
(
"/alpha"
),
get_host_override_slice
(
"foo.test.google.fr:1234"
,
config
),
n_seconds_time
(
1000
),
NULL
);
n_seconds_time
(
1000
),
NULL
);
GPR_ASSERT
(
c1
);
GPR_ASSERT
(
c1
);
c2
=
grpc_channel_create_call
(
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
c2
=
grpc_channel_create_call
(
"/beta"
,
"foo.test.google.fr:1234"
,
f
.
client
,
NULL
,
GRPC_PROPAGATE_DEFAULTS
,
f
.
cq
,
grpc_slice_from_static_string
(
"/beta"
),
get_host_override_slice
(
"foo.test.google.fr:1234"
,
config
),
n_seconds_time
(
3
),
NULL
);
n_seconds_time
(
3
),
NULL
);
GPR_ASSERT
(
c2
);
GPR_ASSERT
(
c2
);
...
@@ -726,12 +728,12 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -726,12 +728,12 @@ static void test_max_concurrent_streams_with_timeout_on_second(
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv1
;
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv1
;
op
->
data
.
recv_status_on_client
.
status
=
&
status1
;
op
->
data
.
recv_status_on_client
.
status
=
&
status1
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details1
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details1
;
op
->
data
.
recv_status_on_client
.
status_details_capacity
=
&
details_capacity1
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
data
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
data
.
recv_initial_metadata
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -762,12 +764,12 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -762,12 +764,12 @@ static void test_max_concurrent_streams_with_timeout_on_second(
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv2
;
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata_recv2
;
op
->
data
.
recv_status_on_client
.
status
=
&
status2
;
op
->
data
.
recv_status_on_client
.
status
=
&
status2
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details2
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details2
;
op
->
data
.
recv_status_on_client
.
status_details_capacity
=
&
details_capacity2
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
op
=
GRPC_OP_RECV_INITIAL_METADATA
;
op
->
data
.
recv_initial_metadata
=
&
initial_metadata_recv1
;
op
->
data
.
recv_initial_metadata
.
recv_initial_metadata
=
&
initial_metadata_recv2
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -799,7 +801,8 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -799,7 +801,8 @@ static void test_max_concurrent_streams_with_timeout_on_second(
op
->
op
=
GRPC_OP_SEND_STATUS_FROM_SERVER
;
op
->
op
=
GRPC_OP_SEND_STATUS_FROM_SERVER
;
op
->
data
.
send_status_from_server
.
trailing_metadata_count
=
0
;
op
->
data
.
send_status_from_server
.
trailing_metadata_count
=
0
;
op
->
data
.
send_status_from_server
.
status
=
GRPC_STATUS_UNIMPLEMENTED
;
op
->
data
.
send_status_from_server
.
status
=
GRPC_STATUS_UNIMPLEMENTED
;
op
->
data
.
send_status_from_server
.
status_details
=
"xyz"
;
grpc_slice
status_details
=
grpc_slice_from_static_string
(
"xyz"
);
op
->
data
.
send_status_from_server
.
status_details
=
&
status_details
;
op
->
flags
=
0
;
op
->
flags
=
0
;
op
->
reserved
=
NULL
;
op
->
reserved
=
NULL
;
op
++
;
op
++
;
...
@@ -815,8 +818,8 @@ static void test_max_concurrent_streams_with_timeout_on_second(
...
@@ -815,8 +818,8 @@ static void test_max_concurrent_streams_with_timeout_on_second(
grpc_call_destroy
(
c1
);
grpc_call_destroy
(
c1
);
grpc_call_destroy
(
s1
);
grpc_call_destroy
(
s1
);
g
pr_free
(
details1
);
g
rpc_slice_unref
(
details1
);
g
pr_free
(
details2
);
g
rpc_slice_unref
(
details2
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv1
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv1
);
grpc_metadata_array_destroy
(
&
trailing_metadata_recv1
);
grpc_metadata_array_destroy
(
&
trailing_metadata_recv1
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv2
);
grpc_metadata_array_destroy
(
&
initial_metadata_recv2
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment