Merge pull request #12666 from nathanielmanistaatgoogle/grpc_1_0_flag

Clean up even more uses of gRPC in _pb2.py files.
pull/12671/head
Nathaniel Manista 7 years ago committed by GitHub
commit 06f5e05466
  1. 4
      src/python/grpcio_tests/tests/http2/negative_http2_client.py
  2. 6
      src/python/grpcio_tests/tests/interop/client.py
  3. 4
      src/python/grpcio_tests/tests/qps/benchmark_client.py
  4. 4
      src/python/grpcio_tests/tests/stress/client.py

@ -17,7 +17,7 @@ import argparse
import grpc
import time
from src.proto.grpc.testing import test_pb2
from src.proto.grpc.testing import test_pb2_grpc
from src.proto.grpc.testing import messages_pb2
@ -147,7 +147,7 @@ def _stub(server_host, server_port):
target = '{}:{}'.format(server_host, server_port)
channel = grpc.insecure_channel(target)
grpc.channel_ready_future(channel).result()
return test_pb2.TestServiceStub(channel)
return test_pb2_grpc.TestServiceStub(channel)
def main():

@ -19,7 +19,7 @@ import os
from google import auth as google_auth
from google.auth import jwt as google_auth_jwt
import grpc
from src.proto.grpc.testing import test_pb2
from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import methods
from tests.interop import resources
@ -106,9 +106,9 @@ def _stub(args):
else:
channel = grpc.insecure_channel(target)
if args.test_case == "unimplemented_service":
return test_pb2.UnimplementedServiceStub(channel)
return test_pb2_grpc.UnimplementedServiceStub(channel)
else:
return test_pb2.TestServiceStub(channel)
return test_pb2_grpc.TestServiceStub(channel)
def _test_case_from_arg(test_case_arg):

@ -22,7 +22,7 @@ from six.moves import queue
import grpc
from src.proto.grpc.testing import messages_pb2
from src.proto.grpc.testing import services_pb2
from src.proto.grpc.testing import services_pb2_grpc
from tests.unit import resources
from tests.unit import test_common
@ -58,7 +58,7 @@ class BenchmarkClient:
if config.payload_config.WhichOneof('payload') == 'simple_params':
self._generic = False
self._stub = services_pb2.BenchmarkServiceStub(channel)
self._stub = services_pb2_grpc.BenchmarkServiceStub(channel)
payload = messages_pb2.Payload(
body='\0' * config.payload_config.simple_params.req_size)
self._request = messages_pb2.SimpleRequest(

@ -20,7 +20,7 @@ import threading
import grpc
from six.moves import queue
from src.proto.grpc.testing import metrics_pb2_grpc
from src.proto.grpc.testing import test_pb2
from src.proto.grpc.testing import test_pb2_grpc
from tests.interop import methods
from tests.interop import resources
@ -133,7 +133,7 @@ def run_test(args):
for _ in xrange(args.num_channels_per_server):
channel = _get_channel(test_server_target, args)
for _ in xrange(args.num_stubs_per_channel):
stub = test_pb2.TestServiceStub(channel)
stub = test_pb2_grpc.TestServiceStub(channel)
runner = test_runner.TestRunner(stub, test_cases, hist,
exception_queue, stop_event)
runners.append(runner)

Loading…
Cancel
Save