You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
=="Channel isn't ready. The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface."
263
+
)
264
+
265
+
guard
266
+
let sslError = rootError.cause as?NIOSSLExtraError,
267
+
case .failedToValidateHostname = sslError
268
+
else{
269
+
Issue.record(
270
+
"Should be a NIOSSLExtraError.failedToValidateHostname error, but was: \(String(describing: rootError.cause))"
217
271
)
218
-
]
219
-
}
220
-
}, throws:{ error in
221
-
guardlet rootError = error as?RPCErrorelse{
222
-
Issue.record("Should be an RPC error")
223
-
returnfalse
224
-
}
225
-
#expect(rootError.code ==.unavailable)
226
-
#expect(rootError.message =="Channel isn't ready. The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface.")
227
-
228
-
guard
229
-
let sslError = rootError.cause as?NIOSSLExtraError,
230
-
case .failedToValidateHostname = sslError
231
-
else{
232
-
Issue.record("Should be a NIOSSLExtraError.failedToValidateHostname error, but was: \(String(describing: rootError.cause))")
233
-
returnfalse
234
-
}
272
+
returnfalse
273
+
}
235
274
236
-
returntrue
237
-
})
275
+
returntrue
276
+
}
277
+
)
238
278
}
239
279
240
280
@Test("Error is surfaced when server fails client verification")
241
281
// Verification should fail because the server does not have trust roots containing the client cert.
=="Channel isn't ready. The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface."
322
+
)
323
+
324
+
guard
325
+
let sslError = rootError.cause as?NIOSSL.BoringSSLError,
326
+
case .sslError = sslError
327
+
else{
328
+
Issue.record(
329
+
"Should be a NIOSSL.sslError error, but was: \(String(describing: rootError.cause))"
257
330
)
258
-
]
259
-
}
260
-
}, throws:{ error in
261
-
guardlet rootError = error as?RPCErrorelse{
262
-
Issue.record("Should be an RPC error")
263
-
returnfalse
264
-
}
265
-
#expect(rootError.code ==.unavailable)
266
-
#expect(rootError.message =="Channel isn't ready. The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface.")
267
-
268
-
guard
269
-
let sslError = rootError.cause as?NIOSSL.BoringSSLError,
270
-
case .sslError = sslError
271
-
else{
272
-
Issue.record("Should be a NIOSSL.sslError error, but was: \(String(describing: rootError.cause))")
0 commit comments