Skip to content

Commit ed9f0d6

Browse files
committed
chore: re-enable K/N ignored tests
1 parent 909fdb3 commit ed9f0d6

File tree

8 files changed

+24
-55
lines changed

8 files changed

+24
-55
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ okio-version = "3.16.0"
1313
otel-version = "1.52.0"
1414
slf4j-version = "2.0.17"
1515
slf4j-v1x-version = "1.7.36"
16-
crt-kotlin-version = "0.11.5"
16+
crt-kotlin-version = "0.11.6"
1717
micrometer-version = "1.15.2"
1818
binary-compatibility-validator-version = "0.18.1"
1919
kotlin-multiplatform-bignum-version = "0.3.10"

runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/SigV4aSignatureCalculatorTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55
package aws.smithy.kotlin.runtime.auth.awssigning
66

7-
import aws.smithy.kotlin.runtime.IgnoreNative
87
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
98
import aws.smithy.kotlin.runtime.time.Instant
109
import aws.smithy.kotlin.runtime.util.PlatformProvider
@@ -69,7 +68,6 @@ private val TESTS = listOf(
6968
* Tests for [SigV4aSignatureCalculator]. Currently only tests forming the string-to-sign.
7069
*/
7170
class SigV4aSignatureCalculatorTest {
72-
@IgnoreNative // FIXME test resources are not loadable on iOS: https://youtrack.jetbrains.com/issue/KT-49981/
7371
@Test
7472
fun testStringToSign() = TESTS.forEach { testId ->
7573
runTest {

runtime/auth/http-auth-aws/common/test/aws/smithy/kotlin/runtime/http/auth/AwsHttpSignerTestBase.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
*/
55
package aws.smithy.kotlin.runtime.http.auth
66

7-
import aws.smithy.kotlin.runtime.IgnoreNative
87
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
98
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
109
import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigner
@@ -127,7 +126,6 @@ public abstract class AwsHttpSignerTestBase(
127126
assertEquals(expectedSig, signed.headers["Authorization"])
128127
}
129128

130-
@IgnoreNative // FIXME Our JVM implementation does not sign `transfer-encoding`, but CRT does, causing a signature mismatch. Upgrade to latest version of aws-c-auth to get the fix.
131129
@Test
132130
public fun testSignAwsChunkedStreamNonReplayable(): TestResult = runTest {
133131
val op = buildOperation(streaming = true, replayable = false, requestBody = "a".repeat(AWS_CHUNKED_THRESHOLD + 1))
@@ -141,7 +139,6 @@ public abstract class AwsHttpSignerTestBase(
141139
assertEquals(expectedSig, signed.headers["Authorization"])
142140
}
143141

144-
@IgnoreNative // FIXME Our JVM implementation does not sign `transfer-encoding`, but CRT does, causing a signature mismatch. Upgrade to latest version of aws-c-auth to get the fix.
145142
@Test
146143
public fun testSignAwsChunkedStreamReplayable(): TestResult = runTest {
147144
val op = buildOperation(streaming = true, replayable = true, requestBody = "a".repeat(AWS_CHUNKED_THRESHOLD + 1))
@@ -155,7 +152,6 @@ public abstract class AwsHttpSignerTestBase(
155152
assertEquals(expectedSig, signed.headers["Authorization"])
156153
}
157154

158-
@IgnoreNative // FIXME Our JVM implementation does not sign `transfer-encoding`, but CRT does, causing a signature mismatch. Upgrade to latest version of aws-c-auth to get the fix.
159155
@Test
160156
public fun testSignOneShotStream(): TestResult = runTest {
161157
val op = buildOperation(streaming = true, replayable = false)

runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/AsyncStressTest.kt

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55

66
package aws.smithy.kotlin.runtime.http.engine.crt
77

8-
import aws.smithy.kotlin.runtime.IgnoreNative
98
import aws.smithy.kotlin.runtime.http.HttpMethod
109
import aws.smithy.kotlin.runtime.http.SdkHttpClient
1110
import aws.smithy.kotlin.runtime.http.complete
1211
import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder
1312
import aws.smithy.kotlin.runtime.http.request.url
1413
import aws.smithy.kotlin.runtime.httptest.TestWithLocalServer
14+
import aws.smithy.kotlin.runtime.io.use
1515
import aws.smithy.kotlin.runtime.net.Host
1616
import aws.smithy.kotlin.runtime.net.Scheme
1717
import io.ktor.server.cio.*
@@ -37,37 +37,38 @@ class AsyncStressTest : TestWithLocalServer() {
3737
}
3838
}.start()
3939

40-
@IgnoreNative // FIXME TlsContext needs to initialize CRT. Segmentation fault.
4140
@Test
4241
fun testStreamNotConsumed() = runBlocking {
4342
// test that filling the stream window and not consuming the body stream still cleans up resources
4443
// appropriately and allows requests to proceed (a stream that isn't consumed will be in a stuck state
4544
// if the window is full and never incremented again, this can lead to all connections being consumed
4645
// and the engine to no longer make further requests)
47-
val client = SdkHttpClient(CrtHttpEngine())
48-
val request = HttpRequestBuilder().apply {
49-
url {
50-
scheme = Scheme.HTTP
51-
method = HttpMethod.GET
52-
host = Host.Domain(testHost)
53-
port = serverPort
54-
path.decoded = "/largeResponse"
46+
CrtHttpEngine().use { engine ->
47+
val client = SdkHttpClient(engine)
48+
val request = HttpRequestBuilder().apply {
49+
url {
50+
scheme = Scheme.HTTP
51+
method = HttpMethod.GET
52+
host = Host.Domain(testHost)
53+
port = serverPort
54+
path.decoded = "/largeResponse"
55+
}
5556
}
56-
}
5757

58-
withTimeout(10.seconds) {
59-
repeat(1_000) {
60-
async {
61-
try {
62-
val call = client.call(request)
63-
yield()
64-
call.complete()
65-
} catch (ex: Exception) {
66-
println("exception on $it: $ex")
67-
throw ex
58+
withTimeout(10.seconds) {
59+
repeat(1_000) {
60+
async {
61+
try {
62+
val call = client.call(request)
63+
yield()
64+
call.complete()
65+
} catch (ex: Exception) {
66+
println("exception on $it: $ex")
67+
throw ex
68+
}
6869
}
70+
yield()
6971
}
70-
yield()
7172
}
7273
}
7374
}

runtime/runtime-core/api/runtime-core.api

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ public final class aws/smithy/kotlin/runtime/ErrorMetadata$Companion {
3333
public abstract interface annotation class aws/smithy/kotlin/runtime/ExperimentalApi : java/lang/annotation/Annotation {
3434
}
3535

36-
public abstract interface annotation class aws/smithy/kotlin/runtime/IgnoreNative : java/lang/annotation/Annotation {
37-
}
38-
3936
public abstract interface annotation class aws/smithy/kotlin/runtime/InternalApi : java/lang/annotation/Annotation {
4037
}
4138

runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,3 @@ public annotation class PlannedRemoval(
7171
val major: Int,
7272
val minor: Int,
7373
)
74-
75-
/**
76-
* Marks a test that should be ignored on Native platforms
77-
*/
78-
@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION)
79-
public expect annotation class IgnoreNative()

runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/AnnotationsJvm.kt

Lines changed: 0 additions & 9 deletions
This file was deleted.

runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/AnnotationsNative.kt

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)