Skip to content

Commit

Permalink
Merge #2887 into 1.1.11
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed Aug 30, 2023
2 parents 3648f27 + 4abc308 commit 40c3ff9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ subprojects {
if (project.hasProperty("forceTransport")) {
systemProperty("forceTransport", forceTransport)
}
systemProperty("nettyVersionMicro", VersionNumber.parse(nettyVersion.toString()).micro)
scanForTestClasses = false
include '**/*Tests.*'
include '**/*Test.*'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018-2022 VMware, Inc. or its affiliates, All Rights Reserved.
* Copyright (c) 2018-2023 VMware, Inc. or its affiliates, All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -394,7 +394,15 @@ void testDefaultClientProviderIsOpenSsl() {

final OpenSslSessionContext sessionContext = clientContext.sessionContext();
assertThat(sessionContext.getSessionTimeout()).isEqualTo(300);
assertThat(sessionContext.isSessionCacheEnabled()).isFalse();
String nettyVersionMicro = System.getProperty("nettyVersionMicro");
// https://github.com/netty/netty/pull/13562
// This change enables client side session cache when using native SSL by default
if (nettyVersionMicro != null && !nettyVersionMicro.isEmpty() && Integer.parseInt(nettyVersionMicro) >= 98) {
assertThat(sessionContext.isSessionCacheEnabled()).isTrue();
}
else {
assertThat(sessionContext.isSessionCacheEnabled()).isFalse();
}
}

@Test
Expand Down

0 comments on commit 40c3ff9

Please sign in to comment.