@@ -37,7 +37,7 @@ private import struct Foundation.Data
37
37
/// - call was successful
38
38
/// - response is non-null
39
39
struct EmptyUnary : InteroperabilityTest {
40
- func run( client: GRPCClient ) async throws {
40
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
41
41
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
42
42
try await testServiceClient. emptyCall (
43
43
request: ClientRequest ( message: Grpc_Testing_Empty ( ) )
@@ -70,7 +70,7 @@ struct EmptyUnary: InteroperabilityTest {
70
70
/// - clients are free to assert that the response payload body contents are zero and comparing
71
71
/// the entire response message against a golden response
72
72
struct LargeUnary : InteroperabilityTest {
73
- func run( client: GRPCClient ) async throws {
73
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
74
74
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
75
75
let request = Grpc_Testing_SimpleRequest . with { request in
76
76
request. responseSize = 314_159
@@ -145,7 +145,7 @@ struct LargeUnary: InteroperabilityTest {
145
145
/// - Clients are free to assert that the response payload body contents are zeros and comparing the
146
146
/// entire response message against a golden response.
147
147
class ClientCompressedUnary : InteroperabilityTest {
148
- func run( client: GRPCClient ) async throws {
148
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
149
149
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
150
150
let compressedRequest = Grpc_Testing_SimpleRequest . with { request in
151
151
request. expectCompressed = . with { $0. value = true }
@@ -253,7 +253,7 @@ class ClientCompressedUnary: InteroperabilityTest {
253
253
/// - clients are free to assert that the response payload body contents are zero and comparing the
254
254
/// entire response message against a golden response
255
255
class ServerCompressedUnary : InteroperabilityTest {
256
- func run( client: GRPCClient ) async throws {
256
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
257
257
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
258
258
259
259
let compressedRequest = Grpc_Testing_SimpleRequest . with { request in
@@ -342,7 +342,7 @@ class ServerCompressedUnary: InteroperabilityTest {
342
342
/// - call was successful
343
343
/// - response aggregated_payload_size is 74922
344
344
struct ClientStreaming : InteroperabilityTest {
345
- func run( client: GRPCClient ) async throws {
345
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
346
346
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
347
347
let request = StreamingClientRequest { writer in
348
348
for bytes in [ 27182 , 8 , 1828 , 45904 ] {
@@ -392,7 +392,7 @@ struct ClientStreaming: InteroperabilityTest {
392
392
/// - clients are free to assert that the response payload body contents are zero and
393
393
/// comparing the entire response messages against golden responses
394
394
struct ServerStreaming : InteroperabilityTest {
395
- func run( client: GRPCClient ) async throws {
395
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
396
396
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
397
397
let responseSizes = [ 31415 , 9 , 2653 , 58979 ]
398
398
let request = Grpc_Testing_StreamingOutputCallRequest . with { request in
@@ -467,7 +467,7 @@ struct ServerStreaming: InteroperabilityTest {
467
467
/// - clients are free to assert that the response payload body contents are zero and comparing the
468
468
/// entire response messages against golden responses
469
469
class ServerCompressedStreaming : InteroperabilityTest {
470
- func run( client: GRPCClient ) async throws {
470
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
471
471
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
472
472
let request : Grpc_Testing_StreamingOutputCallRequest = . with { request in
473
473
request. responseParameters = [
@@ -579,7 +579,7 @@ class ServerCompressedStreaming: InteroperabilityTest {
579
579
/// - clients are free to assert that the response payload body contents are zero and
580
580
/// comparing the entire response messages against golden responses
581
581
struct PingPong : InteroperabilityTest {
582
- func run( client: GRPCClient ) async throws {
582
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
583
583
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
584
584
let ids = AsyncStream . makeStream ( of: Int . self)
585
585
@@ -645,7 +645,7 @@ struct PingPong: InteroperabilityTest {
645
645
/// - call was successful
646
646
/// - exactly zero responses
647
647
struct EmptyStream : InteroperabilityTest {
648
- func run( client: GRPCClient ) async throws {
648
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
649
649
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
650
650
let request = StreamingClientRequest< Grpc_Testing_StreamingOutputCallRequest> { _ in }
651
651
@@ -716,7 +716,7 @@ struct CustomMetadata: InteroperabilityTest {
716
716
try assertEqual ( Array ( values) , [ . binary( self . trailingMetadataValue) ] )
717
717
}
718
718
719
- func run( client: GRPCClient ) async throws {
719
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
720
720
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
721
721
722
722
let unaryRequest = Grpc_Testing_SimpleRequest . with { request in
@@ -823,7 +823,7 @@ struct StatusCodeAndMessage: InteroperabilityTest {
823
823
let expectedCode = 2
824
824
let expectedMessage = " test status message "
825
825
826
- func run( client: GRPCClient ) async throws {
826
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
827
827
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
828
828
829
829
let message = Grpc_Testing_SimpleRequest . with {
@@ -897,7 +897,7 @@ struct StatusCodeAndMessage: InteroperabilityTest {
897
897
/// - received status message is the same as the sent message for Procedure step 1, including all
898
898
/// whitespace characters
899
899
struct SpecialStatusMessage : InteroperabilityTest {
900
- func run( client: GRPCClient ) async throws {
900
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
901
901
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
902
902
903
903
let responseMessage = " \t \n test with whitespace \r \n and Unicode BMP ☺ and non-BMP 😈 \t \n "
@@ -939,7 +939,7 @@ struct SpecialStatusMessage: InteroperabilityTest {
939
939
/// Client asserts:
940
940
/// - received status code is 12 (UNIMPLEMENTED)
941
941
struct UnimplementedMethod : InteroperabilityTest {
942
- func run( client: GRPCClient ) async throws {
942
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
943
943
let testServiceClient = Grpc_Testing_TestService . Client ( wrapping: client)
944
944
try await testServiceClient. unimplementedCall (
945
945
request: ClientRequest ( message: Grpc_Testing_Empty ( ) )
@@ -971,7 +971,7 @@ struct UnimplementedMethod: InteroperabilityTest {
971
971
/// Client asserts:
972
972
/// - received status code is 12 (UNIMPLEMENTED)
973
973
struct UnimplementedService : InteroperabilityTest {
974
- func run( client: GRPCClient ) async throws {
974
+ func run< Transport : ClientTransport > ( client: GRPCClient < Transport > ) async throws {
975
975
let unimplementedServiceClient = Grpc_Testing_UnimplementedService . Client ( wrapping: client)
976
976
try await unimplementedServiceClient. unimplementedCall (
977
977
request: ClientRequest ( message: Grpc_Testing_Empty ( ) )
0 commit comments