Skip to content

Commit f490913

Browse files
committed
Set tls version explicity to make the test pass
1 parent 7c5e32f commit f490913

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

http-clients/aws-crt-client/src/test/java/software/amazon/awssdk/http/crt/H1ServerBehaviorTest.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
import static software.amazon.awssdk.http.SdkHttpConfigurationOption.TRUST_ALL_CERTIFICATES;
1919

20-
import software.amazon.awssdk.crt.io.EventLoopGroup;
21-
import software.amazon.awssdk.crt.io.HostResolver;
20+
import org.junit.AfterClass;
21+
import org.junit.BeforeClass;
2222
import software.amazon.awssdk.http.SdkAsyncHttpClientH1TestSuite;
2323
import software.amazon.awssdk.http.async.SdkAsyncHttpClient;
2424
import software.amazon.awssdk.utils.AttributeMap;
@@ -28,6 +28,19 @@
2828
*/
2929
public class H1ServerBehaviorTest extends SdkAsyncHttpClientH1TestSuite {
3030

31+
private static final String JDK_TLS_CLIENT_PROTOCOLS = "jdk.tls.client.protocols";
32+
33+
@BeforeClass
34+
public static void setUp() {
35+
// TODO: remove this once the dependency is fixed
36+
System.setProperty(JDK_TLS_CLIENT_PROTOCOLS, "TLSv1.2");
37+
}
38+
39+
@AfterClass
40+
public static void cleanUp() {
41+
System.clearProperty(JDK_TLS_CLIENT_PROTOCOLS);
42+
}
43+
3144
@Override
3245
protected SdkAsyncHttpClient setupClient() {
3346
return AwsCrtAsyncHttpClient.builder()

0 commit comments

Comments
 (0)