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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
5a34d452
Commit
5a34d452
authored
10 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
WIP simple_request
parent
a57fa9f0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/core/end2end/tests/simple_request.c
+29
-8
29 additions, 8 deletions
test/core/end2end/tests/simple_request.c
with
29 additions
and
8 deletions
test/core/end2end/tests/simple_request.c
+
29
−
8
View file @
5a34d452
...
...
@@ -109,17 +109,38 @@ static void simple_request_body(grpc_end2end_test_fixture f) {
gpr_timespec
deadline
=
five_seconds_time
();
cq_verifier
*
v_client
=
cq_verifier_create
(
f
.
client_cq
);
cq_verifier
*
v_server
=
cq_verifier_create
(
f
.
server_cq
);
c
=
grpc_channel_create_call_old
(
f
.
client
,
"/foo"
,
"test.google.com"
,
grpc_op
ops
[
4
];
grpc_op
*
op
;
grpc_metadata_array
trailing_metadata_recv
;
grpc_metadata_array
request_metadata_recv
;
grpc_call_details
call_details
;
grpc_status_code
status
;
char
*
details
=
NULL
;
size_t
details_capacity
=
NULL
;
c
=
grpc_channel_create_call
(
f
.
client
,
f
.
client_cq
,
"/foo"
,
"test.google.com"
,
deadline
);
GPR_ASSERT
(
c
);
GPR_ASSERT
(
GRPC_CALL_OK
==
grpc_call_invoke_old
(
c
,
f
.
client_cq
,
tag
(
2
),
tag
(
3
),
0
));
GPR_ASSERT
(
GRPC_CALL_OK
==
grpc_call_writes_done_old
(
c
,
tag
(
4
)));
cq_expect_finish_accepted
(
v_client
,
tag
(
4
),
GRPC_OP_OK
);
cq_verify
(
v_client
);
grpc_metadata_array_init
(
&
trailing_metadata_recv
);
grpc_metadata_array_init
(
&
request_metadata_recv
);
grpc_call_details_init
(
&
call_details
);
op
=
ops
;
op
->
op
=
GRPC_OP_SEND_INITIAL_METADATA
;
op
->
data
.
send_initial_metadata
.
count
=
0
;
op
++
;
op
->
op
=
GRPC_OP_RECV_STATUS_ON_CLIENT
;
op
->
data
.
recv_status_on_client
.
trailing_metadata
=
&
trailing_metadata
;
op
->
data
.
recv_status_on_client
.
status
=
&
status
;
op
->
data
.
recv_status_on_client
.
status_details
=
&
details
;
op
->
data
.
recv_status_on_client
.
status_details_capacity
=
&
details_capacity
;
op
++
;
op
->
op
=
GRPC_OP_SEND_CLOSE_FROM_CLIENT
;
op
++
;
GPR_ASSERT
(
GRPC_CALL_OK
==
grpc_call_send_batch
(
call
,
ops
,
op
-
ops
,
tag
(
1
)));
GPR_ASSERT
(
GRPC_CALL_OK
==
grpc_server_request_call
(
f
.
server
,
&
call_details
,
&
request_metadata_recv
,
f
.
server_cq
,
tag
(
101
)));
cq_expect_
GPR_ASSERT
(
GRPC_CALL_OK
==
grpc_server_request_call_old
(
f
.
server
,
tag
(
100
)));
cq_expect_server_rpc_new
(
v_server
,
&
s
,
tag
(
100
),
"/foo"
,
"test.google.com"
,
...
...
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