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
6b45d012
Commit
6b45d012
authored
8 years ago
by
Sree Kuchibhotla
Browse files
Options
Downloads
Patches
Plain Diff
fix tests after rebase
parent
4f31f44f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/core/end2end/tests/keepalive_timeout.c
+5
-4
5 additions, 4 deletions
test/core/end2end/tests/keepalive_timeout.c
test/core/surface/completion_queue_threading_test.c
+18
-1
18 additions, 1 deletion
test/core/surface/completion_queue_threading_test.c
with
23 additions
and
5 deletions
test/core/end2end/tests/keepalive_timeout.c
+
5
−
4
View file @
6b45d012
...
@@ -75,10 +75,10 @@ static void drain_cq(grpc_completion_queue *cq) {
...
@@ -75,10 +75,10 @@ static void drain_cq(grpc_completion_queue *cq) {
static
void
shutdown_server
(
grpc_end2end_test_fixture
*
f
)
{
static
void
shutdown_server
(
grpc_end2end_test_fixture
*
f
)
{
if
(
!
f
->
server
)
return
;
if
(
!
f
->
server
)
return
;
grpc_server_shutdown_and_notify
(
f
->
server
,
f
->
cq
,
tag
(
1000
));
grpc_server_shutdown_and_notify
(
f
->
server
,
f
->
shutdown_
cq
,
tag
(
1000
));
GPR_ASSERT
(
GPR_ASSERT
(
grpc_completion_queue_pluck
(
f
->
shutdown_cq
,
tag
(
1000
),
grpc_completion_queue_pluck
(
f
->
cq
,
tag
(
1000
),
five_seconds_time
(),
NULL
)
five_seconds_time
(),
NULL
)
.
type
==
GRPC_OP_COMPLETE
);
.
type
==
GRPC_OP_COMPLETE
);
grpc_server_destroy
(
f
->
server
);
grpc_server_destroy
(
f
->
server
);
f
->
server
=
NULL
;
f
->
server
=
NULL
;
}
}
...
@@ -96,6 +96,7 @@ static void end_test(grpc_end2end_test_fixture *f) {
...
@@ -96,6 +96,7 @@ static void end_test(grpc_end2end_test_fixture *f) {
grpc_completion_queue_shutdown
(
f
->
cq
);
grpc_completion_queue_shutdown
(
f
->
cq
);
drain_cq
(
f
->
cq
);
drain_cq
(
f
->
cq
);
grpc_completion_queue_destroy
(
f
->
cq
);
grpc_completion_queue_destroy
(
f
->
cq
);
grpc_completion_queue_destroy
(
f
->
shutdown_cq
);
}
}
/* Client sends a request, server replies with a payload, then waits for the
/* Client sends a request, server replies with a payload, then waits for the
...
...
This diff is collapsed.
Click to expand it.
test/core/surface/completion_queue_threading_test.c
+
18
−
1
View file @
6b45d012
...
@@ -52,7 +52,24 @@ static void *create_test_tag(void) {
...
@@ -52,7 +52,24 @@ static void *create_test_tag(void) {
static
void
shutdown_and_destroy
(
grpc_completion_queue
*
cc
)
{
static
void
shutdown_and_destroy
(
grpc_completion_queue
*
cc
)
{
grpc_event
ev
;
grpc_event
ev
;
grpc_completion_queue_shutdown
(
cc
);
grpc_completion_queue_shutdown
(
cc
);
ev
=
grpc_completion_queue_next
(
cc
,
gpr_inf_past
(
GPR_CLOCK_REALTIME
),
NULL
);
switch
(
grpc_get_cq_completion_type
(
cc
))
{
case
GRPC_CQ_NEXT
:
{
ev
=
grpc_completion_queue_next
(
cc
,
gpr_inf_past
(
GPR_CLOCK_REALTIME
),
NULL
);
break
;
}
case
GRPC_CQ_PLUCK
:
{
ev
=
grpc_completion_queue_pluck
(
cc
,
create_test_tag
(),
gpr_inf_past
(
GPR_CLOCK_REALTIME
),
NULL
);
break
;
}
default:
{
gpr_log
(
GPR_ERROR
,
"Unknown completion type"
);
break
;
}
}
GPR_ASSERT
(
ev
.
type
==
GRPC_QUEUE_SHUTDOWN
);
GPR_ASSERT
(
ev
.
type
==
GRPC_QUEUE_SHUTDOWN
);
grpc_completion_queue_destroy
(
cc
);
grpc_completion_queue_destroy
(
cc
);
}
}
...
...
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