Tweaked SSL test cases to make them pass with Java 11

This commit is contained in:
Oleg Kalnichevski 2019-01-19 10:46:48 +01:00
parent aae6a9b3c9
commit 47df3352fd
1 changed files with 3 additions and 1 deletions

View File

@ -203,8 +203,10 @@ public class TestSSLSocketFactory {
final SSLSocket sslSocket = (SSLSocket) socketFactory.connectSocket(0, socket, target, remoteAddress, null,
context);
try {
final SSLSession sslsession = sslSocket.getSession();
final InputStream inputStream = sslSocket.getInputStream();
Assert.assertEquals(-1, inputStream.read());
final SSLSession sslsession = sslSocket.getSession();
Assert.assertNotNull(sslsession);
Assert.assertTrue(hostVerifier.isFired());
} finally {