Skip to content

Commit 5490ba9

Browse files
committed
revert httpConnectionTest changes
1 parent 25d2284 commit 5490ba9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

aws-crt-kotlin/common/test/aws/sdk/kotlin/crt/http/HttpClientConnectionTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class HttpClientConnectionTest : CrtTest() {
7171
// bad ssl
7272
// assertConnect("https://rsa2048.badssl.com/")
7373
assertConnect("http://http.badssl.com/")
74-
assertConnectFails("https://expired.badssl.com/", listOf("TLS (SSL) negotiation failed", "Certificate has expired"))
75-
assertConnectFails("https://self-signed.badssl.com/", listOf("TLS (SSL) negotiation failed", "Certificate has expired"))
74+
assertConnectFails("https://expired.badssl.com/", "TLS (SSL) negotiation failed")
75+
assertConnectFails("https://self-signed.badssl.com/", "TLS (SSL) negotiation failed")
7676
}
7777

7878
/**
@@ -88,11 +88,11 @@ class HttpClientConnectionTest : CrtTest() {
8888
}
8989

9090
/**
91-
* Assert that an attempt to connect to the given [url] fails with any of the given [exceptionMessages]
91+
* Assert that an attempt to connect to the given [url] fails with the given [exceptionMessage]
9292
*/
93-
private suspend fun assertConnectFails(url: String, exceptionMessages: List<String>) {
93+
private suspend fun assertConnectFails(url: String, exceptionMessage: String) {
9494
val ex = assertFails { connectAllCiphers(url) }
95-
assertTrue(exceptionMessages.any { ex.message!!.contains(it) }, "Expected one of ${exceptionMessages.joinToString(", ")} in exception message, but got: ${ex.message}")
95+
assertTrue(ex.message!!.contains(exceptionMessage))
9696
}
9797

9898
/**

0 commit comments

Comments
 (0)