@@ -174,17 +174,18 @@ class ClientCompressedUnary: InteroperabilityTest {
174174 }
175175
176176 // With compression expected and enabled.
177- options. compression = . gzip
178-
179- try await testServiceClient. unaryCall (
180- request: ClientRequest ( message: compressedRequest) ,
181- options: options
182- ) { response in
183- switch response. accepted {
184- case . success( let success) :
185- try assertEqual ( success. message. get ( ) . payload. body, Data ( repeating: 0 , count: 314_159 ) )
186- case . failure:
187- throw AssertionFailure ( message: " Response should have been accepted. " )
177+ for algorithm in [ CompressionAlgorithm . gzip, . deflate] {
178+ options. compression = algorithm
179+ try await testServiceClient. unaryCall (
180+ request: ClientRequest ( message: compressedRequest) ,
181+ options: options
182+ ) { response in
183+ switch response. accepted {
184+ case . success( let success) :
185+ try assertEqual ( success. message. get ( ) . payload. body, Data ( repeating: 0 , count: 314_159 ) )
186+ case . failure:
187+ throw AssertionFailure ( message: " Response should have been accepted. " )
188+ }
188189 }
189190 }
190191
@@ -266,7 +267,7 @@ class ServerCompressedUnary: InteroperabilityTest {
266267 request: ClientRequest ( message: compressedRequest)
267268 ) { response in
268269 // We can't verify that the compression bit was set, instead we verify that the encoding header
269- // was sent by the server. This isn't quite the same since as it can still be set but the
270+ // was sent by the server. This isn't quite the same as it can still be set but the
270271 // compression may _not_ be set.
271272 try assertTrue ( response. metadata [ " grpc-encoding " ] . contains { $0 != " identity " } )
272273
0 commit comments