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
488d4191
Commit
488d4191
authored
8 years ago
by
Nathaniel Manista
Browse files
Options
Downloads
Patches
Plain Diff
Update health to current gRPC code elements
parent
40d55f9d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/python/grpcio_health_checking/grpc_health/v1/health.py
+2
-1
2 additions, 1 deletion
src/python/grpcio_health_checking/grpc_health/v1/health.py
src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
+3
-2
3 additions, 2 deletions
.../grpcio_tests/tests/health_check/_health_servicer_test.py
with
5 additions
and
3 deletions
src/python/grpcio_health_checking/grpc_health/v1/health.py
+
2
−
1
View file @
488d4191
...
...
@@ -33,9 +33,10 @@ import threading
import
grpc
from
grpc_health.v1
import
health_pb2
from
grpc_health.v1
import
health_pb2_grpc
class
HealthServicer
(
health_pb2
.
HealthServicer
):
class
HealthServicer
(
health_pb2
_grpc
.
HealthServicer
):
"""
Servicer handling RPCs for service statuses.
"""
def
__init__
(
self
):
...
...
This diff is collapsed.
Click to expand it.
src/python/grpcio_tests/tests/health_check/_health_servicer_test.py
+
3
−
2
View file @
488d4191
...
...
@@ -34,6 +34,7 @@ import grpc
from
grpc.framework.foundation
import
logging_pool
from
grpc_health.v1
import
health
from
grpc_health.v1
import
health_pb2
from
grpc_health.v1
import
health_pb2_grpc
from
tests.unit.framework.common
import
test_constants
...
...
@@ -52,11 +53,11 @@ class HealthServicerTest(unittest.TestCase):
server_pool
=
logging_pool
.
pool
(
test_constants
.
THREAD_CONCURRENCY
)
self
.
_server
=
grpc
.
server
(
server_pool
)
port
=
self
.
_server
.
add_insecure_port
(
'
[::]:0
'
)
health_pb2
.
add_HealthServicer_to_server
(
servicer
,
self
.
_server
)
health_pb2
_grpc
.
add_HealthServicer_to_server
(
servicer
,
self
.
_server
)
self
.
_server
.
start
()
channel
=
grpc
.
insecure_channel
(
'
localhost:%d
'
%
port
)
self
.
_stub
=
health_pb2
.
HealthStub
(
channel
)
self
.
_stub
=
health_pb2
_grpc
.
HealthStub
(
channel
)
def
test_empty_service
(
self
):
request
=
health_pb2
.
HealthCheckRequest
()
...
...
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