Skip to content

Commit 8732745

Browse files
committed
OpenSslEngine skip ALPN tests if OpenSsl version doesn't support ALPN
Motivation: OpenSslEngine now tests ALPN behavior. However it is possible that OpenSSL is present, but the version does not support ALPN. This will result in test failures instead of just skipping the test. Modifications: - Skip ALPN tests in OpenSslEngineTest if the version of OpenSSL does not support ALPN Result: Tests don't fail due to unsupported feature in OpenSSL.
1 parent ba22b0b commit 8732745

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

handler/src/test/java/io/netty/handler/ssl/OpenSslEngineTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public void testNpn() throws Exception {
4040
@Test
4141
public void testAlpn() throws Exception {
4242
assumeTrue(OpenSsl.isAvailable());
43+
assumeTrue(OpenSsl.isAlpnSupported());
4344
ApplicationProtocolConfig apn = acceptingNegotiator(Protocol.ALPN,
4445
PREFERRED_APPLICATION_LEVEL_PROTOCOL);
4546
setupHandlers(apn);
@@ -49,6 +50,7 @@ public void testAlpn() throws Exception {
4950
@Test
5051
public void testAlpnCompatibleProtocolsDifferentClientOrder() throws Exception {
5152
assumeTrue(OpenSsl.isAvailable());
53+
assumeTrue(OpenSsl.isAlpnSupported());
5254
ApplicationProtocolConfig clientApn = acceptingNegotiator(Protocol.ALPN,
5355
FALLBACK_APPLICATION_LEVEL_PROTOCOL, PREFERRED_APPLICATION_LEVEL_PROTOCOL);
5456
ApplicationProtocolConfig serverApn = acceptingNegotiator(Protocol.ALPN,

0 commit comments

Comments
 (0)