Merge pull request #9348 from ncteisen/python_negative_http2_fix

Change expected error code in Python negative interop client
pull/9415/head
Noah Eisen 8 years ago committed by GitHub
commit 659e563e2e
  1. 11
      src/python/grpcio_tests/tests/http2/negative_http2_client.py

@ -82,20 +82,22 @@ def _goaway(stub):
def _rst_after_header(stub): def _rst_after_header(stub):
resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST) resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST)
_validate_status_code_and_details(resp_future, grpc.StatusCode.UNAVAILABLE, _validate_status_code_and_details(resp_future, grpc.StatusCode.INTERNAL,
"") "Received RST_STREAM with error code 0")
def _rst_during_data(stub): def _rst_during_data(stub):
resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST) resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST)
_validate_status_code_and_details(resp_future, grpc.StatusCode.UNKNOWN, "") _validate_status_code_and_details(resp_future, grpc.StatusCode.INTERNAL,
"Received RST_STREAM with error code 0")
def _rst_after_data(stub): def _rst_after_data(stub):
resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST) resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST)
_validate_payload_type_and_length( _validate_payload_type_and_length(
next(resp_future), messages_pb2.COMPRESSABLE, _RESPONSE_SIZE) next(resp_future), messages_pb2.COMPRESSABLE, _RESPONSE_SIZE)
_validate_status_code_and_details(resp_future, grpc.StatusCode.UNKNOWN, "") _validate_status_code_and_details(resp_future, grpc.StatusCode.INTERNAL,
"Received RST_STREAM with error code 0")
def _ping(stub): def _ping(stub):
@ -159,6 +161,7 @@ def _args():
def _stub(server_host, server_port): def _stub(server_host, server_port):
target = '{}:{}'.format(server_host, server_port) target = '{}:{}'.format(server_host, server_port)
channel = grpc.insecure_channel(target) channel = grpc.insecure_channel(target)
grpc.channel_ready_future(channel).result()
return test_pb2.TestServiceStub(channel) return test_pb2.TestServiceStub(channel)
Loading…
Cancel
Save