diff options
author | Nathaniel Manista <nathaniel@google.com> | 2015-08-24 18:49:45 +0000 |
---|---|---|
committer | Nathaniel Manista <nathaniel@google.com> | 2015-08-24 18:49:45 +0000 |
commit | 2432c224d9e18f9db3e6852b3f7154e5691de32b (patch) | |
tree | 9a5288a1feb6b627f0ee6888fc8aa0af31d790ae /src/python/grpcio_test/grpc_test | |
parent | 04715888e60c6195a2c1d9d6b31f7a82f0d717e2 (diff) |
Add a "transport" field to links.Ticket
This will be used for communication of transport-specific values and
objects up to applications.
Diffstat (limited to 'src/python/grpcio_test/grpc_test')
4 files changed, 12 insertions, 11 deletions
diff --git a/src/python/grpcio_test/grpc_test/_links/_lonely_invocation_link_test.py b/src/python/grpcio_test/grpc_test/_links/_lonely_invocation_link_test.py index abe240e07a..373a2b2a1f 100644 --- a/src/python/grpcio_test/grpc_test/_links/_lonely_invocation_link_test.py +++ b/src/python/grpcio_test/grpc_test/_links/_lonely_invocation_link_test.py @@ -66,7 +66,7 @@ class LonelyInvocationLinkTest(unittest.TestCase): ticket = links.Ticket( test_operation_id, 0, test_group, test_method, links.Ticket.Subscription.FULL, test_constants.SHORT_TIMEOUT, 1, None, - None, None, None, None, termination) + None, None, None, None, termination, None) invocation_link.accept_ticket(ticket) invocation_link_mate.block_until_tickets_satisfy(test_cases.terminated) diff --git a/src/python/grpcio_test/grpc_test/_links/_transmission_test.py b/src/python/grpcio_test/grpc_test/_links/_transmission_test.py index 9cdc9620f0..02ddd512c2 100644 --- a/src/python/grpcio_test/grpc_test/_links/_transmission_test.py +++ b/src/python/grpcio_test/grpc_test/_links/_transmission_test.py @@ -128,14 +128,14 @@ class RoundTripTest(unittest.TestCase): invocation_ticket = links.Ticket( test_operation_id, 0, test_group, test_method, links.Ticket.Subscription.FULL, test_constants.LONG_TIMEOUT, None, None, - None, None, None, None, links.Ticket.Termination.COMPLETION) + None, None, None, None, links.Ticket.Termination.COMPLETION, None) invocation_link.accept_ticket(invocation_ticket) service_mate.block_until_tickets_satisfy(test_cases.terminated) service_ticket = links.Ticket( service_mate.tickets()[-1].operation_id, 0, None, None, None, None, None, None, None, None, test_code, test_message, - links.Ticket.Termination.COMPLETION) + links.Ticket.Termination.COMPLETION, None) service_link.accept_ticket(service_ticket) invocation_mate.block_until_tickets_satisfy(test_cases.terminated) @@ -174,33 +174,34 @@ class RoundTripTest(unittest.TestCase): invocation_ticket = links.Ticket( test_operation_id, 0, test_group, test_method, links.Ticket.Subscription.FULL, test_constants.LONG_TIMEOUT, None, None, - None, None, None, None, None) + None, None, None, None, None, None) invocation_link.accept_ticket(invocation_ticket) requests = scenario.requests() for request_index, request in enumerate(requests): request_ticket = links.Ticket( test_operation_id, 1 + request_index, None, None, None, None, 1, None, - request, None, None, None, None) + request, None, None, None, None, None) invocation_link.accept_ticket(request_ticket) service_mate.block_until_tickets_satisfy( test_cases.at_least_n_payloads_received_predicate(1 + request_index)) response_ticket = links.Ticket( service_mate.tickets()[0].operation_id, request_index, None, None, None, None, 1, None, scenario.response_for_request(request), None, - None, None, None) + None, None, None, None) service_link.accept_ticket(response_ticket) invocation_mate.block_until_tickets_satisfy( test_cases.at_least_n_payloads_received_predicate(1 + request_index)) request_count = len(requests) invocation_completion_ticket = links.Ticket( test_operation_id, request_count + 1, None, None, None, None, None, - None, None, None, None, None, links.Ticket.Termination.COMPLETION) + None, None, None, None, None, links.Ticket.Termination.COMPLETION, + None) invocation_link.accept_ticket(invocation_completion_ticket) service_mate.block_until_tickets_satisfy(test_cases.terminated) service_completion_ticket = links.Ticket( service_mate.tickets()[0].operation_id, request_count, None, None, None, None, None, None, None, None, test_code, test_message, - links.Ticket.Termination.COMPLETION) + links.Ticket.Termination.COMPLETION, None) service_link.accept_ticket(service_completion_ticket) invocation_mate.block_until_tickets_satisfy(test_cases.terminated) diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_cases.py b/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_cases.py index 1e575d1a9e..ecf49d9cdb 100644 --- a/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_cases.py +++ b/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_cases.py @@ -300,7 +300,7 @@ class TransmissionTest(object): invocation_operation_id, 0, _TRANSMISSION_GROUP, _TRANSMISSION_METHOD, links.Ticket.Subscription.FULL, timeout, 0, invocation_initial_metadata, invocation_payload, invocation_terminal_metadata, invocation_code, - invocation_message, links.Ticket.Termination.COMPLETION) + invocation_message, links.Ticket.Termination.COMPLETION, None) self._invocation_link.accept_ticket(original_invocation_ticket) self._service_mate.block_until_tickets_satisfy( @@ -317,7 +317,7 @@ class TransmissionTest(object): service_operation_id, 0, None, None, links.Ticket.Subscription.FULL, timeout, 0, service_initial_metadata, service_payload, service_terminal_metadata, service_code, service_message, - links.Ticket.Termination.COMPLETION) + links.Ticket.Termination.COMPLETION, None) self._service_link.accept_ticket(original_service_ticket) self._invocation_mate.block_until_tickets_satisfy(terminated) self._assert_is_valid_service_sequence( diff --git a/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_utilities.py b/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_utilities.py index a2bd7107c1..39c7f2fc63 100644 --- a/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_utilities.py +++ b/src/python/grpcio_test/grpc_test/framework/interfaces/links/test_utilities.py @@ -64,7 +64,7 @@ def _safe_for_log_ticket(ticket): ticket.allowance, ticket.initial_metadata, '<payload of length {}>'.format(payload_length), ticket.terminal_metadata, ticket.code, ticket.message, - ticket.termination) + ticket.termination, None) class RecordingLink(links.Link): |