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
4270dc6d
Commit
4270dc6d
authored
8 years ago
by
David Garcia Quintas
Browse files
Options
Downloads
Patches
Plain Diff
Update test_get_channel_info() to use new ch arg syntax
parent
b794a968
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/client_channel/lb_policies_test.c
+10
-2
10 additions, 2 deletions
test/core/client_channel/lb_policies_test.c
with
10 additions
and
2 deletions
test/core/client_channel/lb_policies_test.c
+
10
−
2
View file @
4270dc6d
...
@@ -642,8 +642,16 @@ static void test_pending_calls(size_t concurrent_calls) {
...
@@ -642,8 +642,16 @@ static void test_pending_calls(size_t concurrent_calls) {
}
}
static
void
test_get_channel_info
()
{
static
void
test_get_channel_info
()
{
grpc_channel
*
channel
=
grpc_insecure_channel_create
(
grpc_channel_args
args
;
"test:127.0.0.1:1234?lb_policy=round_robin"
,
NULL
,
NULL
);
grpc_arg
arg_array
[
1
];
arg_array
[
0
].
type
=
GRPC_ARG_STRING
;
arg_array
[
0
].
key
=
GRPC_ARG_LB_POLICY_NAME
;
arg_array
[
0
].
value
.
string
=
"round_robin"
;
args
.
num_args
=
1
;
args
.
args
=
arg_array
;
grpc_channel
*
channel
=
grpc_insecure_channel_create
(
"ipv4:127.0.0.1:1234"
,
&
args
,
NULL
);
// Ensures that resolver returns.
// Ensures that resolver returns.
grpc_channel_check_connectivity_state
(
channel
,
true
/* try_to_connect */
);
grpc_channel_check_connectivity_state
(
channel
,
true
/* try_to_connect */
);
// Use grpc_channel_get_info() to get LB policy name.
// Use grpc_channel_get_info() to get LB policy name.
...
...
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