diff options
author | 2017-01-19 22:31:35 -0800 | |
---|---|---|
committer | 2017-01-19 22:31:35 -0800 | |
commit | 659e563e2eb03ff01681995e465597e8493abcf3 (patch) | |
tree | 0dfffcc1663d2d2d1f7474c585ad5651c7007771 | |
parent | fffb692d37867f040b2b7bb2e982d5137dfb123e (diff) | |
parent | af2c01e73e265265c6e30aa2fef5f9768f6a1d9f (diff) |
Merge pull request #9348 from ncteisen/python_negative_http2_fix
Change expected error code in Python negative interop client
-rw-r--r-- | src/python/grpcio_tests/tests/http2/negative_http2_client.py (renamed from src/python/grpcio_tests/tests/http2/_negative_http2_client.py) | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/python/grpcio_tests/tests/http2/_negative_http2_client.py b/src/python/grpcio_tests/tests/http2/negative_http2_client.py index c192d827c4..b8adf093a5 100644 --- a/src/python/grpcio_tests/tests/http2/_negative_http2_client.py +++ b/src/python/grpcio_tests/tests/http2/negative_http2_client.py @@ -82,20 +82,22 @@ def _goaway(stub): def _rst_after_header(stub): 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): 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): resp_future = stub.UnaryCall.future(_SIMPLE_REQUEST) _validate_payload_type_and_length( 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): @@ -159,6 +161,7 @@ def _args(): 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) |