Fixed test that was failing due to TLS 1.3 backport to Java 8.
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
71087e53a6
commit
1d71cabef4
|
@ -164,8 +164,15 @@ public class ALPNNegotiationTest extends AbstractALPNTest
|
||||||
encrypted.flip();
|
encrypted.flip();
|
||||||
}
|
}
|
||||||
assertEquals(21, encrypted.get());
|
assertEquals(21, encrypted.get());
|
||||||
|
// TLS 1.3 may send 2 alerts: "user_canceled" followed by "close_notify".
|
||||||
encrypted.clear();
|
encrypted.clear();
|
||||||
assertEquals(-1, channel.read(encrypted));
|
read = channel.read(encrypted);
|
||||||
|
if (read > 0)
|
||||||
|
{
|
||||||
|
encrypted.clear();
|
||||||
|
read = channel.read(encrypted);
|
||||||
|
}
|
||||||
|
assertEquals(-1, read);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue