diff --git a/.changes/1021e75a-45f3-4f3a-820c-700d9ec6e782.json b/.changes/1021e75a-45f3-4f3a-820c-700d9ec6e782.json new file mode 100644 index 0000000000..0fad5e0349 --- /dev/null +++ b/.changes/1021e75a-45f3-4f3a-820c-700d9ec6e782.json @@ -0,0 +1,5 @@ +{ + "id": "1021e75a-45f3-4f3a-820c-700d9ec6e782", + "type": "bugfix", + "description": "Fix serialization of CBOR blobs" +} \ No newline at end of file diff --git a/.github/workflows/api-compat-verification.yml b/.github/workflows/api-compat-verification.yml index 26c7ef3901..8094a95c08 100644 --- a/.github/workflows/api-compat-verification.yml +++ b/.github/workflows/api-compat-verification.yml @@ -3,7 +3,7 @@ name: API compatibility verification on: pull_request: types: [ opened, synchronize, reopened, labeled, unlabeled ] - branches: [ main ] + branches: [ main, '*-main' ] jobs: api-compat-verification: diff --git a/.github/workflows/artifact-size-metrics.yml b/.github/workflows/artifact-size-metrics.yml index bd1c521e16..676084e08d 100644 --- a/.github/workflows/artifact-size-metrics.yml +++ b/.github/workflows/artifact-size-metrics.yml @@ -2,7 +2,7 @@ name: Artifact Size Metrics on: pull_request: types: [ opened, synchronize, reopened, labeled, unlabeled ] - branches: [ main ] + branches: [ main, '*-main' ] release: types: [published] @@ -53,9 +53,9 @@ jobs: role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }} aws-region: us-west-2 - name: Generate Artifact Size Metrics - run: ./gradlew artifactSizeMetrics + run: ./gradlew -Paws.kotlin.native=false artifactSizeMetrics - name: Analyze Artifact Size Metrics - run: ./gradlew analyzeArtifactSizeMetrics + run: ./gradlew -Paws.kotlin.native=false analyzeArtifactSizeMetrics - name: Show Results uses: actions/github-script@v7 with: diff --git a/.github/workflows/changelog-verification.yml b/.github/workflows/changelog-verification.yml index 547b155abf..c9ad6da818 100644 --- a/.github/workflows/changelog-verification.yml +++ b/.github/workflows/changelog-verification.yml @@ -3,7 +3,7 @@ name: Changelog verification on: pull_request: types: [ opened, synchronize, reopened, labeled, unlabeled ] - branches: [ main ] + branches: [ main, '*-main' ] jobs: changelog-verification: diff --git a/.github/workflows/ci.yml b/.github/workflows/continuous-integration.yml similarity index 84% rename from .github/workflows/ci.yml rename to .github/workflows/continuous-integration.yml index a3cdbee204..ccbca2a8e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/continuous-integration.yml @@ -135,6 +135,44 @@ jobs: name: test-reports-windows path: '**/build/reports' + all-platforms: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + steps: + - name: Checkout sources + uses: actions/checkout@v4 + with: + path: 'smithy-kotlin' + + - name: Setup build + uses: ./smithy-kotlin/.github/actions/setup-build + + - name: Configure JDK + uses: actions/setup-java@v3 + with: + distribution: 'corretto' + java-version: 17 + cache: 'gradle' + + - name: Test + working-directory: ./smithy-kotlin + shell: bash + run: | + # FIXME K2. Re-enable warnings as errors after this warning is removed: https://youtrack.jetbrains.com/issue/KT-68532 + # echo "kotlinWarningsAsErrors=true" >> $GITHUB_WORKSPACE/local.properties + ./gradlew -Paws.kotlin.native=false apiCheck + ./gradlew -Paws.kotlin.native=false test jvmTest + + - name: Save Test Reports + if: failure() + uses: actions/upload-artifact@v3 + with: + name: test-reports-${{ matrix.os }} + path: '**/build/reports' + protocol-tests: runs-on: ubuntu-latest steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 892e2b1248..5473a56d69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.3.31] - 12/18/2024 + +### Features +* [#1473](https://github.com/awslabs/aws-sdk-kotlin/issues/1473) Enhance support for replayable instances of `InputStream` + +## [1.3.30] - 12/16/2024 + ## [1.3.29] - 12/12/2024 ## [1.3.28] - 12/03/2024 diff --git a/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpProtocolUnitTestRequestGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpProtocolUnitTestRequestGenerator.kt index 74bd7db782..6fcc47c3e5 100644 --- a/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpProtocolUnitTestRequestGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/protocol/HttpProtocolUnitTestRequestGenerator.kt @@ -117,11 +117,11 @@ open class HttpProtocolUnitTestRequestGenerator protected constructor(builder: B write("return") } write("requireNotNull(expectedBytes) { #S }", "expected application/cbor body cannot be null") - write("requireNotNull(expectedBytes) { #S }", "actual application/cbor body cannot be null") + write("requireNotNull(actualBytes) { #S }", "actual application/cbor body cannot be null") write("") write("val expectedRequest = #L(#T(expectedBytes))", inputDeserializer.name, RuntimeTypes.Serde.SerdeCbor.CborDeserializer) - write("val actualRequest = #L(#T(expectedBytes))", inputDeserializer.name, RuntimeTypes.Serde.SerdeCbor.CborDeserializer) + write("val actualRequest = #L(#T(actualBytes))", inputDeserializer.name, RuntimeTypes.Serde.SerdeCbor.CborDeserializer) write("assertEquals(expectedRequest, actualRequest)") } writer.write("") diff --git a/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGenerator.kt b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGenerator.kt index e7f2e261ef..d8810044a5 100644 --- a/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGenerator.kt +++ b/codegen/smithy-kotlin-codegen/src/main/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGenerator.kt @@ -647,7 +647,6 @@ open class SerializeStructGenerator( val target = member.targetOrSelf(ctx.model) val encoded = when { - target.type == ShapeType.BLOB -> writer.format("#L.#T()", identifier, RuntimeTypes.Core.Text.Encoding.encodeBase64String) target.type == ShapeType.TIMESTAMP -> { writer.addImport(RuntimeTypes.Core.TimestampFormat) val tsFormat = member diff --git a/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGeneratorTest.kt b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGeneratorTest.kt index 40d9c9db7d..347da007cb 100644 --- a/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGeneratorTest.kt +++ b/codegen/smithy-kotlin-codegen/src/test/kotlin/software/amazon/smithy/kotlin/codegen/rendering/serde/SerializeStructGeneratorTest.kt @@ -1822,7 +1822,7 @@ class SerializeStructGeneratorTest { val expected = """ serializer.serializeStruct(OBJ_DESCRIPTOR) { - input.fooBlob?.let { field(FOOBLOB_DESCRIPTOR, it.encodeBase64String()) } + input.fooBlob?.let { field(FOOBLOB_DESCRIPTOR, it) } } """.trimIndent() diff --git a/gradle.properties b/gradle.properties index f35cfc1d5a..f902a36719 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ kotlinx.atomicfu.enableNativeIrTransformation=false org.gradle.jvmargs=-Xmx2G -XX:MaxMetaspaceSize=1G # SDK -sdkVersion=1.3.30-SNAPSHOT +sdkVersion=1.3.32-SNAPSHOT # codegen -codegenVersion=0.33.30-SNAPSHOT \ No newline at end of file +codegenVersion=0.33.32-SNAPSHOT \ No newline at end of file diff --git a/runtime/auth/aws-credentials/common/test/aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentialsProviderTest.kt b/runtime/auth/aws-credentials/common/test/aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentialsProviderTest.kt index 6eb9b0d034..15a5ba1adf 100644 --- a/runtime/auth/aws-credentials/common/test/aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentialsProviderTest.kt +++ b/runtime/auth/aws-credentials/common/test/aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentialsProviderTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.auth.awscredentials +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.Attributes import aws.smithy.kotlin.runtime.time.Instant import aws.smithy.kotlin.runtime.time.ManualClock @@ -36,6 +37,7 @@ class CachedCredentialsProviderTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testLoadFirstCall() = runTest { // explicit expiration @@ -50,6 +52,7 @@ class CachedCredentialsProviderTest { assertEquals(1, source.callCount) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testDefaultExpiration() = runTest { // expiration should come from the cached provider @@ -62,6 +65,7 @@ class CachedCredentialsProviderTest { assertEquals(1, source.callCount) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReloadExpiredCredentials() = runTest { val source = TestCredentialsProvider(expiration = testExpiration) @@ -77,6 +81,7 @@ class CachedCredentialsProviderTest { assertEquals(2, source.callCount) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRefreshBufferWindow() = runTest { val source = TestCredentialsProvider(expiration = testExpiration) @@ -98,6 +103,7 @@ class CachedCredentialsProviderTest { assertEquals(2, source.callCount) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testLoadFailed() = runTest { val source = object : CredentialsProvider { @@ -120,6 +126,7 @@ class CachedCredentialsProviderTest { provider.resolve() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testItThrowsOnGetCredentialsAfterClose() = runTest { val source = TestCredentialsProvider(expiration = testExpiration) @@ -137,6 +144,7 @@ class CachedCredentialsProviderTest { assertEquals(1, source.callCount) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testCachedConvenienceFunction() = runTest { val source = TestCredentialsProvider(expiration = testExpiration) diff --git a/runtime/auth/aws-signing-common/common/test/aws/smithy/kotlin/runtime/auth/awssigning/PresignerTest.kt b/runtime/auth/aws-signing-common/common/test/aws/smithy/kotlin/runtime/auth/awssigning/PresignerTest.kt index ec7a9d4ec7..3f6e4eb5de 100644 --- a/runtime/auth/aws-signing-common/common/test/aws/smithy/kotlin/runtime/auth/awssigning/PresignerTest.kt +++ b/runtime/auth/aws-signing-common/common/test/aws/smithy/kotlin/runtime/auth/awssigning/PresignerTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.auth.awssigning +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider import aws.smithy.kotlin.runtime.client.endpoints.Endpoint @@ -24,12 +25,14 @@ import kotlin.test.assertTrue class PresignerTest { // Verify that custom endpoint URL schemes aren't changed. // See https://github.com/awslabs/aws-sdk-kotlin/issues/938 + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testSignedUrlAllowsHttp() = testSigningUrl("http://localhost:8080/path/to/resource?foo=bar") // Verify that custom endpoint URL schemes aren't changed. // See https://github.com/awslabs/aws-sdk-kotlin/issues/938 @Test + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation fun testSignedUrlAllowsHttps() = testSigningUrl("https://localhost:8088/path/to/resource?bar=foo") private fun testSigningUrl(url: String) = runTest { diff --git a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultCanonicalizerTest.kt b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultCanonicalizerTest.kt index 7fc20ddb83..e5047ee56b 100644 --- a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultCanonicalizerTest.kt +++ b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultCanonicalizerTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.auth.awssigning +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awssigning.tests.DEFAULT_TEST_CREDENTIALS import aws.smithy.kotlin.runtime.http.* @@ -18,6 +19,7 @@ import kotlin.test.assertEquals class DefaultCanonicalizerTest { // Test adapted from https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCanonicalize() = runTest { val request = HttpRequest { @@ -78,6 +80,7 @@ class DefaultCanonicalizerTest { } // Targeted test for proper URI path escaping. See https://github.com/smithy-lang/smithy-kotlin/issues/657 + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testEscapablePath() { val uri = Url.Builder() @@ -94,6 +97,7 @@ class DefaultCanonicalizerTest { assertEquals("/2013-04-01/healthcheck/foo%253Cbar%253Ebaz%253C%252Fbar%253E", uri.canonicalPath(config)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCanonicalPath() { val config = AwsSigningConfig { @@ -109,6 +113,7 @@ class DefaultCanonicalizerTest { assertEquals("/foo/%40bar/baz%253Cqux%253Aquux", uri.canonicalPath(config)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCanonicalQueryParams() { Url.Builder().apply { @@ -123,6 +128,7 @@ class DefaultCanonicalizerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testUnsignedHeaders() = runTest { val request = HttpRequest { @@ -155,6 +161,7 @@ class DefaultCanonicalizerTest { assertEquals(expectedSignedHeaders, actual.signedHeaders) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCustomPort() = runTest { val request = HttpRequest { diff --git a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultRequestMutatorTest.kt b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultRequestMutatorTest.kt index 7eb10ab692..7f84e8658a 100644 --- a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultRequestMutatorTest.kt +++ b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultRequestMutatorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.auth.awssigning +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody @@ -15,6 +16,7 @@ import kotlin.test.Test import kotlin.test.assertEquals class DefaultRequestMutatorTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testAppendAuthHeader() { val canonical = CanonicalRequest(baseRequest.toBuilder(), "", "action;host;x-amz-date", "") diff --git a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultSignatureCalculatorTest.kt b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultSignatureCalculatorTest.kt index fc5c23304c..60264a43ac 100644 --- a/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultSignatureCalculatorTest.kt +++ b/runtime/auth/aws-signing-default/common/test/aws/smithy/kotlin/runtime/auth/awssigning/DefaultSignatureCalculatorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.auth.awssigning +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awssigning.tests.DEFAULT_TEST_CREDENTIALS import aws.smithy.kotlin.runtime.hashing.sha256 @@ -16,6 +17,7 @@ import kotlin.test.assertEquals class DefaultSignatureCalculatorTest { // Test adapted from https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCalculate() { val signingKey = "c4afb1cc5771d871763a393e44b703571b55cc28424d1a5e86da6ed3c154a4b9".decodeHexBytes() @@ -32,6 +34,7 @@ class DefaultSignatureCalculatorTest { } // Test adapted from https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testSigningKey() = runTest { val config = AwsSigningConfig { @@ -47,6 +50,7 @@ class DefaultSignatureCalculatorTest { } // Test adapted from https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testStringToSign() { val canonicalRequest = """ @@ -80,6 +84,7 @@ class DefaultSignatureCalculatorTest { private data class ChunkStringToSignTest(val signatureType: AwsSignatureType, val expectedNonSignatureHeaderHash: String) + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testChunkStringToSign() { // Test event stream signing diff --git a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedByteReadChannelTestBase.kt b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedByteReadChannelTestBase.kt index f86ef5ba3a..3374dedc42 100644 --- a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedByteReadChannelTestBase.kt +++ b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedByteReadChannelTestBase.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.auth.awssigning.tests +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awssigning.* import aws.smithy.kotlin.runtime.auth.awssigning.internal.CHUNK_SIZE_BYTES import aws.smithy.kotlin.runtime.io.* @@ -17,6 +18,7 @@ import kotlin.test.* import kotlin.time.Duration.Companion.milliseconds abstract class AwsChunkedByteReadChannelTestBase : AwsChunkedTestBase(AwsChunkedReaderFactory.Channel) { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testSlowProducerMultipleChunksPartialLast(): TestResult = runTest { val numChunks = 6 diff --git a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedTestBase.kt b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedTestBase.kt index 10247109ae..be05b88eb9 100644 --- a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedTestBase.kt +++ b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedTestBase.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.auth.awssigning.tests +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awssigning.* import aws.smithy.kotlin.runtime.auth.awssigning.internal.CHUNK_SIZE_BYTES import aws.smithy.kotlin.runtime.http.DeferredHeaders @@ -171,6 +172,7 @@ abstract class AwsChunkedTestBase( return length } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadNegativeOffset(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -184,6 +186,7 @@ abstract class AwsChunkedTestBase( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadExactBytes(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -217,6 +220,7 @@ abstract class AwsChunkedTestBase( assertTrue(awsChunked.isClosedForRead()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadExcessiveBytes(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -246,6 +250,7 @@ abstract class AwsChunkedTestBase( assertTrue(awsChunked.isClosedForRead()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadFewerBytes(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -272,6 +277,7 @@ abstract class AwsChunkedTestBase( assertFalse(awsChunked.isClosedForRead()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadMultipleFullChunks(): TestResult = runTest { val numChunks = 5 @@ -319,6 +325,7 @@ abstract class AwsChunkedTestBase( assertTrue(awsChunked.isClosedForRead()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadMultipleChunksLastChunkNotFull(): TestResult = runTest { val numChunks = 6 @@ -384,6 +391,7 @@ abstract class AwsChunkedTestBase( assertEquals(0, chunkSizes.last()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadWithTrailingHeaders(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -434,6 +442,7 @@ abstract class AwsChunkedTestBase( assertEquals(expectedTrailerSignature.decodeToString(), trailerSignature) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testUnsignedChunk(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES @@ -465,6 +474,7 @@ abstract class AwsChunkedTestBase( assertEquals(chunkSizes[1], 0) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testUnsignedChunkWithTrailingHeaders(): TestResult = runTest { val dataLengthBytes = CHUNK_SIZE_BYTES diff --git a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/BasicSigningTestBase.kt b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/BasicSigningTestBase.kt index 2a517fc090..3f4e1e1d17 100644 --- a/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/BasicSigningTestBase.kt +++ b/runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/BasicSigningTestBase.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.auth.awssigning.tests +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awssigning.* import aws.smithy.kotlin.runtime.http.HttpBody @@ -55,6 +56,7 @@ public abstract class BasicSigningTestBase : HasSigner { credentials = DEFAULT_TEST_CREDENTIALS } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSignRequestSigV4(): TestResult = runTest { // sanity test @@ -83,6 +85,7 @@ public abstract class BasicSigningTestBase : HasSigner { assertEquals(expectedSig, result.signature.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public open fun testSignRequestSigV4Asymmetric(): TestResult = runTest { // sanity test @@ -165,6 +168,7 @@ public abstract class BasicSigningTestBase : HasSigner { return chunk } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSignChunks(): TestResult = runTest { val request = createChunkedTestRequest() @@ -188,6 +192,7 @@ public abstract class BasicSigningTestBase : HasSigner { assertEquals(EXPECTED_FINAL_CHUNK_SIGNATURE, finalChunkResult.signature.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSigningCopiesInput(): TestResult = runTest { // sanity test the signer doesn't mutate the input and instead copies to a new request diff --git a/runtime/auth/http-auth-aws/common/test/aws/smithy/kotlin/runtime/http/auth/AwsHttpSignerTestBase.kt b/runtime/auth/http-auth-aws/common/test/aws/smithy/kotlin/runtime/http/auth/AwsHttpSignerTestBase.kt index 2ce308df8f..86d5744a62 100644 --- a/runtime/auth/http-auth-aws/common/test/aws/smithy/kotlin/runtime/http/auth/AwsHttpSignerTestBase.kt +++ b/runtime/auth/http-auth-aws/common/test/aws/smithy/kotlin/runtime/http/auth/AwsHttpSignerTestBase.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.http.auth +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigner @@ -105,6 +106,7 @@ public abstract class AwsHttpSignerTestBase( return operation.context[HttpOperationContext.HttpCallList].last().request } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSignRequest(): TestResult = runTest { val op = buildOperation() @@ -118,6 +120,7 @@ public abstract class AwsHttpSignerTestBase( assertEquals(expectedSig, signed.headers["Authorization"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testUnsignedRequest(): TestResult = runTest { val op = buildOperation(unsigned = true) @@ -131,6 +134,7 @@ public abstract class AwsHttpSignerTestBase( assertEquals(expectedSig, signed.headers["Authorization"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSignReplayableStreamingRequest(): TestResult = runTest { val op = buildOperation(streaming = true) @@ -144,6 +148,7 @@ public abstract class AwsHttpSignerTestBase( assertEquals(expectedSig, signed.headers["Authorization"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test public fun testSignAwsChunkedStreamNonReplayable(): TestResult = runTest { val op = buildOperation(streaming = true, replayable = false, requestBody = "a".repeat(AWS_CHUNKED_THRESHOLD + 1)) @@ -157,6 +162,7 @@ public abstract class AwsHttpSignerTestBase( assertEquals(expectedSig, signed.headers["Authorization"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test public fun testSignAwsChunkedStreamReplayable(): TestResult = runTest { val op = buildOperation(streaming = true, replayable = true, requestBody = "a".repeat(AWS_CHUNKED_THRESHOLD + 1)) @@ -170,6 +176,7 @@ public abstract class AwsHttpSignerTestBase( assertEquals(expectedSig, signed.headers["Authorization"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test public fun testSignOneShotStream(): TestResult = runTest { val op = buildOperation(streaming = true, replayable = false) diff --git a/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/ReadChannelBodyStreamTest.kt b/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/ReadChannelBodyStreamTest.kt index eb0acf777e..b4afa25c91 100644 --- a/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/ReadChannelBodyStreamTest.kt +++ b/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/ReadChannelBodyStreamTest.kt @@ -6,6 +6,7 @@ package aws.smithy.kotlin.runtime.crt import aws.sdk.kotlin.crt.io.MutableBuffer +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.io.SdkByteChannel import aws.smithy.kotlin.runtime.io.SdkByteReadChannel @@ -26,6 +27,7 @@ class ReadChannelBodyStreamTest { return MutableBuffer.of(dest) to dest } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1 @Test fun testClose() = runTest { val chan = SdkByteChannel() @@ -42,6 +44,7 @@ class ReadChannelBodyStreamTest { assertTrue(stream.sendRequestBody(sendBuffer)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1 @Test fun testCancellation() = runTest { val chan = SdkByteChannel() @@ -56,6 +59,7 @@ class ReadChannelBodyStreamTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1 @Test fun testReadFully() = runTest { val data = byteArrayOf(1, 2, 3, 4, 5) @@ -71,6 +75,7 @@ class ReadChannelBodyStreamTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1 @Test fun testPartialRead() = runTest { val chan = SdkByteReadChannel("123456".encodeToByteArray()) @@ -89,6 +94,7 @@ class ReadChannelBodyStreamTest { assertEquals("456", sent2.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1 @Test fun testLargeTransfer() = runTest { val chan = SdkByteChannel() diff --git a/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/SdkSourceBodyStreamTest.kt b/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/SdkSourceBodyStreamTest.kt index 4c8ee5c3ba..eb4209c74a 100644 --- a/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/SdkSourceBodyStreamTest.kt +++ b/runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/SdkSourceBodyStreamTest.kt @@ -6,6 +6,7 @@ package aws.smithy.kotlin.runtime.crt import aws.sdk.kotlin.crt.io.MutableBuffer +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.io.SdkSource import aws.smithy.kotlin.runtime.io.source @@ -21,6 +22,7 @@ class SdkSourceBodyStreamTest { return MutableBuffer.of(dest) to dest } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFully() = runTest { val data = byteArrayOf(1, 2, 3, 4, 5) @@ -35,6 +37,7 @@ class SdkSourceBodyStreamTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testPartialRead() = runTest { val source = "123456".encodeToByteArray().source() @@ -52,6 +55,7 @@ class SdkSourceBodyStreamTest { assertEquals("456", sent2.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testLargeTransfer() = runTest { val data = "foobar" diff --git a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/EventStreamSigningTest.kt b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/EventStreamSigningTest.kt index b672571184..f9333af4a9 100644 --- a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/EventStreamSigningTest.kt +++ b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/EventStreamSigningTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.eventstream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider import aws.smithy.kotlin.runtime.auth.awssigning.* @@ -28,6 +29,7 @@ class EventStreamSigningTest { override suspend fun resolve(attributes: Attributes) = testCredentials } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSignPayload() = runTest { val messageToSign = buildMessage { @@ -66,6 +68,7 @@ class EventStreamSigningTest { assertEquals(expected, actualSignature) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEmptyEndFrameSent() = runTest { val messageToSign = buildMessage { diff --git a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecoderTest.kt b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecoderTest.kt index dd118def5a..a9214f46e4 100644 --- a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecoderTest.kt +++ b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecoderTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.eventstream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.* import io.kotest.matchers.string.shouldContain import kotlinx.coroutines.flow.* @@ -14,7 +15,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFailsWith class FrameDecoderTest { - + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFrameStreamSingleMessage() = runTest { val encoded = validMessageWithAllHeaders() @@ -28,6 +29,7 @@ class FrameDecoderTest { assertEquals(expected, actual.first()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFrameStreamMultipleMessagesChunked() = runTest { val encoded = SdkBuffer().apply { @@ -51,6 +53,7 @@ class FrameDecoderTest { assertEquals(expected3, actual[2]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testChannelClosed() = runTest { // contents don't matter diff --git a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderTest.kt b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderTest.kt index ccc80102ed..ae82292eec 100644 --- a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderTest.kt +++ b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.eventstream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.readAll import aws.smithy.kotlin.runtime.io.SdkBuffer import kotlinx.coroutines.flow.flowOf @@ -16,6 +17,7 @@ import kotlin.test.assertContentEquals import kotlin.test.assertEquals class FrameEncoderTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEncode() = runTest { val expected = listOf( @@ -42,6 +44,7 @@ class FrameEncoderTest { assertContentEquals(expected[2], actual[2].readByteArray()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testAsEventStreamHttpBody() = runTest { val messages = flowOf( diff --git a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueTest.kt b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueTest.kt index 12895d367f..8478472b32 100644 --- a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueTest.kt +++ b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.eventstream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.time.Instant import aws.smithy.kotlin.runtime.util.Uuid import io.kotest.matchers.string.shouldContain @@ -14,6 +15,8 @@ import kotlin.test.assertEquals import kotlin.test.assertFails class HeaderValueTest { + + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testExpectAs() { assertEquals(true, HeaderValue.Bool(true).expectBool()) diff --git a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageTest.kt b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageTest.kt index 4b37771253..95ec4e8dbd 100644 --- a/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageTest.kt +++ b/runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/MessageTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.eventstream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.EOFException import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.time.Instant @@ -52,6 +53,7 @@ fun validMessageNoHeaders(): ByteArray = byteArrayFrom( class MessageTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testMessageNoHeaders() { // Test message taken from the CRT: @@ -68,6 +70,7 @@ class MessageTest { assertEquals(expectedPayload, actual.payload.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testMessageOneHeader() { // Test message taken from the CRT: @@ -89,6 +92,7 @@ class MessageTest { assertEquals(expectedHeaders, actual.headers) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRoundTripAllHeadersPayload() { val encoded = validMessageWithAllHeaders() @@ -118,6 +122,7 @@ class MessageTest { assertContentEquals(message.payload, result.payload) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeaderStringValueLength() { // header length = -1 @@ -139,6 +144,7 @@ class MessageTest { }.message.shouldContain("Invalid HeaderValue; type=STRING, len=65535") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeaderStringLengthCutoff() { val encoded = byteArrayFrom( @@ -155,6 +161,7 @@ class MessageTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeaderValueType() { val encoded = byteArrayFrom( @@ -175,6 +182,7 @@ class MessageTest { }.message.shouldContain("Unknown HeaderType: 96") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeaderNameLength() { val encoded = byteArrayFrom( @@ -195,6 +203,7 @@ class MessageTest { }.message.shouldContain("Invalid header name length") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeadersLength() { val encoded = byteArrayFrom( @@ -211,6 +220,7 @@ class MessageTest { }.message.shouldContain("Not enough bytes to read header name; needed: 3; remaining: 1") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidPreludeChecksum() { val encoded = byteArrayFrom( @@ -231,6 +241,7 @@ class MessageTest { }.message.shouldContain("Prelude checksum mismatch; expected=0xdeadbeef; calculated=0x8bb495fb") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidMessageChecksum() { val encoded = byteArrayFrom( @@ -251,6 +262,7 @@ class MessageTest { }.message.shouldContain("Message checksum mismatch; expected=0xdeadbeef; calculated=0x01a05860") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidHeaderNameLengthTooLong() { val encoded = byteArrayFrom( diff --git a/runtime/protocol/aws-json-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/json/AwsJsonProtocolTest.kt b/runtime/protocol/aws-json-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/json/AwsJsonProtocolTest.kt index ac53fc26a8..41cbabfe8f 100644 --- a/runtime/protocol/aws-json-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/json/AwsJsonProtocolTest.kt +++ b/runtime/protocol/aws-json-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/json/AwsJsonProtocolTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.awsprotocol.json +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.operation.* @@ -17,7 +18,7 @@ import kotlin.test.Test import kotlin.test.assertEquals class AwsJsonProtocolTest { - + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSetJsonProtocolHeaders() = runTest { @Suppress("DEPRECATION") @@ -40,6 +41,7 @@ class AwsJsonProtocolTest { assertEquals("FooService_blah.Bar", request.headers["X-Amz-Target"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEmptyBody() = runTest { @Suppress("DEPRECATION") @@ -59,6 +61,7 @@ class AwsJsonProtocolTest { assertEquals("{}", actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDoesNotOverride() = runTest { @Suppress("DEPRECATION") diff --git a/runtime/protocol/aws-protocol-core/common/test/ClockSkewInterceptorTest.kt b/runtime/protocol/aws-protocol-core/common/test/ClockSkewInterceptorTest.kt index 930b8ee646..67bd5c90a4 100644 --- a/runtime/protocol/aws-protocol-core/common/test/ClockSkewInterceptorTest.kt +++ b/runtime/protocol/aws-protocol-core/common/test/ClockSkewInterceptorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.awsprotocol +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.SdkBaseException import aws.smithy.kotlin.runtime.ServiceErrorMetadata import aws.smithy.kotlin.runtime.awsprotocol.ClockSkewInterceptor.Companion.CLOCK_SKEW_THRESHOLD @@ -31,6 +32,7 @@ private val POSSIBLE_SKEWED_RESPONSE_CODE_DESCRIPTION = "InvalidSignatureExcepti private val NOT_SKEWED_RESPONSE_CODE_DESCRIPTION = "RequestThrottled" class ClockSkewInterceptorTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testNotSkewed() { val clientTime = Instant.fromRfc5322("Wed, 6 Oct 2023 16:20:50 -0400") @@ -39,6 +41,7 @@ class ClockSkewInterceptorTest { assertFalse(clientTime.isSkewed(serverTime, NOT_SKEWED_RESPONSE_CODE_DESCRIPTION)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSkewedByResponseCode() { // clocks are exactly the same, but service returned skew error @@ -48,6 +51,7 @@ class ClockSkewInterceptorTest { assertEquals(0.days, clientTime.until(serverTime)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSkewedByTime() { val clientTime = Instant.fromRfc5322("Wed, 6 Oct 2023 16:20:50 -0400") @@ -56,6 +60,7 @@ class ClockSkewInterceptorTest { assertEquals(1.days, clientTime.until(serverTime)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNegativeSkewedByTime() { val clientTime = Instant.fromRfc5322("Wed, 7 Oct 2023 16:20:50 -0400") @@ -64,6 +69,7 @@ class ClockSkewInterceptorTest { assertEquals(-1.days, clientTime.until(serverTime)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSkewThreshold() { val minute = 20 @@ -125,6 +131,7 @@ class ClockSkewInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testClockSkewApplied() = runTest { testRoundTrip( @@ -135,6 +142,7 @@ class ClockSkewInterceptorTest { ) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testClockSkewNotApplied_NoSkew() = runTest { testRoundTrip( @@ -145,6 +153,7 @@ class ClockSkewInterceptorTest { ) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testClockSkewNotApplied_BadDate() = runTest { testRoundTrip( diff --git a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/AsyncStressTest.kt b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/AsyncStressTest.kt index 39f4170550..7d0b0def83 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/AsyncStressTest.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/AsyncStressTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.engine.crt +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.SdkHttpClient import aws.smithy.kotlin.runtime.http.complete @@ -36,6 +37,7 @@ class AsyncStressTest : TestWithLocalServer() { } }.start() + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testStreamNotConsumed() = runBlocking { // test that filling the stream window and not consuming the body stream still cleans up resources diff --git a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/RequestConversionTest.kt b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/RequestConversionTest.kt index 88e88561e7..531a253127 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/RequestConversionTest.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/RequestConversionTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.engine.crt +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.ByteStream import aws.smithy.kotlin.runtime.crt.ReadChannelBodyStream import aws.smithy.kotlin.runtime.http.* @@ -53,6 +54,7 @@ class RequestConversionTest { assertFalse(crtRequest.body is ReadChannelBodyStream) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSdkToCrtRequestStreamingBody() { val stream = byteStreamFromContents("foobar") @@ -71,6 +73,7 @@ class RequestConversionTest { crtBody.cancel() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEngineAddsContentLengthHeader() { val stream = byteStreamFromContents("foobar") diff --git a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SdkStreamResponseHandlerTest.kt b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SdkStreamResponseHandlerTest.kt index 005d577f74..e5fc0259c9 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SdkStreamResponseHandlerTest.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SdkStreamResponseHandlerTest.kt @@ -7,6 +7,7 @@ package aws.smithy.kotlin.runtime.http.engine.crt import aws.sdk.kotlin.crt.http.* import aws.sdk.kotlin.crt.io.byteArrayBuffer +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpErrorCode import aws.smithy.kotlin.runtime.http.HttpException @@ -124,6 +125,7 @@ class SdkStreamResponseHandlerTest { assertTrue(respChan.isClosedForWrite) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRespBody() = runTest { val handler = SdkStreamResponseHandler(mockConn, coroutineContext) @@ -152,6 +154,7 @@ class SdkStreamResponseHandlerTest { assertEquals(data, respChan.readToBuffer().readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testStreamError() = runTest { val handler = SdkStreamResponseHandler(mockConn, coroutineContext) diff --git a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SendChunkedBodyTest.kt b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SendChunkedBodyTest.kt index 88366c41f0..f456817161 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SendChunkedBodyTest.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-crt/jvmAndNative/test/aws/smithy/kotlin/runtime/http/engine/crt/SendChunkedBodyTest.kt @@ -6,6 +6,7 @@ package aws.smithy.kotlin.runtime.http.engine.crt import aws.sdk.kotlin.crt.http.HttpStream +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.toHttpBody import aws.smithy.kotlin.runtime.io.SdkByteReadChannel import aws.smithy.kotlin.runtime.io.readToByteArray @@ -27,6 +28,7 @@ class SendChunkedBodyTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSourceContent() = runTest { val stream = MockHttpStream(200) @@ -44,6 +46,7 @@ class SendChunkedBodyTest { assertEquals(1, stream.numChunksWritten) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testChannelContentMultipleChunks() = runTest { val stream = MockHttpStream(200) @@ -65,6 +68,7 @@ class SendChunkedBodyTest { assertTrue(stream.numChunksWritten > 1) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testChannelContent() = runTest { val stream = MockHttpStream(200) @@ -83,6 +87,7 @@ class SendChunkedBodyTest { assertEquals(1, stream.numChunksWritten) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSourceContentMultipleChunks() = runTest { val stream = MockHttpStream(200) diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpCallContextTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpCallContextTest.kt index cb41cff0d4..e6183f8ece 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpCallContextTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpCallContextTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.http.engine +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpCall @@ -24,6 +25,7 @@ import kotlin.test.assertTrue import kotlin.coroutines.coroutineContext as currentCoroutineContext class HttpCallContextTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @OptIn(ExperimentalCoroutinesApi::class) @Test fun testStructuredConcurrency() = runTest { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpClientEngineTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpClientEngineTest.kt index 4468534cb8..0fbaa6cb04 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpClientEngineTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/engine/HttpClientEngineTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.engine +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.HttpCall import aws.smithy.kotlin.runtime.http.complete @@ -60,6 +61,7 @@ class HttpClientEngineTest { private val HttpCall.job: Job get() = coroutineContext.job + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCallComplete() = runTest { val call = client.call(HttpRequestBuilder()) @@ -69,6 +71,7 @@ class HttpClientEngineTest { assertTrue(call.job.isCompleted) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testUserContextCancelsRequestJob() = runTest { val job = launch { @@ -85,6 +88,7 @@ class HttpClientEngineTest { assertTrue(callJob.isCancelled) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testInFlightRequestJobsAreIndependent() = runTest { val job1 = launch { @@ -109,6 +113,7 @@ class HttpClientEngineTest { job2.cancel() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testEngineJobNotCancelledByRequestJobs() = runTest { launch { @@ -126,6 +131,7 @@ class HttpClientEngineTest { assertTrue(engine.coroutineContext.job.isActive) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testShutdownOnlyAfterInFlightDone() = runTest { val waiter = Channel(1) @@ -160,6 +166,7 @@ class HttpClientEngineTest { assertTrue(engine.shutdownCalled) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testRequestAfterClose() = runTest { engine.close() diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptorTest.kt index 3de8e557c2..dc2ba12894 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/AbstractChecksumInterceptorTest.kt @@ -2,6 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.client.ProtocolRequestInterceptorContext import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.HttpBody @@ -24,6 +25,7 @@ private val CHECKSUM_TEST_HEADER = "x-amz-kotlin-sdk-test-checksum-header" class AbstractChecksumInterceptorTest { private val client = SdkHttpClient(TestEngine()) + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testChecksumIsCalculatedAndApplied() = runTest { val req = HttpRequestBuilder().apply { @@ -40,6 +42,7 @@ class AbstractChecksumInterceptorTest { assertEquals(expectedChecksumValue, call.request.headers[CHECKSUM_TEST_HEADER]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCachedChecksumIsUsed() = runTest { val req = HttpRequestBuilder().apply { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsRequestInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsRequestInterceptorTest.kt index c4c85de66b..6d4483fe17 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsRequestInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsRequestInterceptorTest.kt @@ -6,6 +6,7 @@ package aws.smithy.kotlin.runtime.http.interceptors import aws.smithy.kotlin.runtime.ClientException +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.hashing.toHashFunction import aws.smithy.kotlin.runtime.http.* @@ -31,6 +32,7 @@ class FlexibleChecksumsRequestInterceptorTest { "sha256" to "1dXchshIKqXiaKCqueqR7AOz1qLpiqayo7gbnaxzaQo=", ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSetsChecksumHeader() = runTest { checksums.forEach { (checksumAlgorithmName, expectedChecksumValue) -> @@ -52,6 +54,7 @@ class FlexibleChecksumsRequestInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itAllowsOnlyOneChecksumHeader() = runTest { val req = HttpRequestBuilder().apply { @@ -77,6 +80,7 @@ class FlexibleChecksumsRequestInterceptorTest { assertEquals(1, call.request.headers.getNumChecksumHeaders()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itThrowsOnUnsupportedChecksumAlgorithm() = runTest { val req = HttpRequestBuilder().apply { @@ -98,6 +102,7 @@ class FlexibleChecksumsRequestInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itRemovesChecksumHeadersForAwsChunked() = runTest { val data = ByteArray(65536 * 32) { 'a'.code.toByte() } @@ -126,6 +131,7 @@ class FlexibleChecksumsRequestInterceptorTest { assertEquals(0, call.request.headers.getNumChecksumHeaders()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSetsChecksumHeaderViaExecutionContext() = runTest { checksums.forEach { (checksumAlgorithmName, expectedChecksumValue) -> @@ -143,6 +149,7 @@ class FlexibleChecksumsRequestInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCompletingSource() = runTest { val hashFunctionName = "crc32" @@ -164,6 +171,7 @@ class FlexibleChecksumsRequestInterceptorTest { assertEquals(expectedHash.digest().encodeBase64String(), completableDeferred.await()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCompletingByteReadChannel() = runTest { val hashFunctionName = "sha256" @@ -186,6 +194,7 @@ class FlexibleChecksumsRequestInterceptorTest { assertEquals(expectedHash.digest().encodeBase64String(), completableDeferred.await()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itUsesPrecalculatedChecksum() = runTest { val req = HttpRequestBuilder().apply { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsResponseInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsResponseInterceptorTest.kt index 2c04ee680d..f046ca66e0 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsResponseInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/FlexibleChecksumsResponseInterceptorTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.interceptors +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.HttpCall @@ -66,6 +67,7 @@ class FlexibleChecksumsResponseInterceptorTest { return SdkHttpClient(mockEngine) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testResponseChecksumValid() = runTest { checksums.forEach { (checksumAlgorithmName, expectedChecksum) -> @@ -92,6 +94,7 @@ class FlexibleChecksumsResponseInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testResponseServiceChecksumInvalid() = runTest { checksums.forEach { (checksumAlgorithmName, _) -> @@ -120,6 +123,7 @@ class FlexibleChecksumsResponseInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testMultipleChecksumsReturned() = runTest { val req = HttpRequestBuilder() @@ -144,6 +148,7 @@ class FlexibleChecksumsResponseInterceptorTest { assertEquals("x-amz-checksum-crc32c", op.context[ChecksumHeaderValidated]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testSkipsValidationOfMultipartChecksum() = runTest { val req = HttpRequestBuilder() @@ -164,6 +169,7 @@ class FlexibleChecksumsResponseInterceptorTest { op.roundTrip(client, TestInput("input")) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testSkipsValidationWhenDisabled() = runTest { val req = HttpRequestBuilder() diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/Md5ChecksumInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/Md5ChecksumInterceptorTest.kt index 109d2e3e8d..5fac330b64 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/Md5ChecksumInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/Md5ChecksumInterceptorTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.interceptors +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.SdkHttpClient @@ -22,6 +23,7 @@ import kotlin.test.assertNull class Md5ChecksumInterceptorTest { private val client = SdkHttpClient(TestEngine()) + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSetsContentMd5Header() = runTest { val req = HttpRequestBuilder().apply { @@ -41,6 +43,7 @@ class Md5ChecksumInterceptorTest { assertEquals(expected, call.request.headers["Content-MD5"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itOnlySetsHeaderForBytesContent() = runTest { val req = HttpRequestBuilder().apply { @@ -61,6 +64,7 @@ class Md5ChecksumInterceptorTest { assertNull(call.request.headers["Content-MD5"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itDoesNotSetContentMd5Header() = runTest { val req = HttpRequestBuilder().apply { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/RequestCompressionInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/RequestCompressionInterceptorTest.kt index 55641129d9..dc847a8839 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/RequestCompressionInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/RequestCompressionInterceptorTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.interceptors +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.compression.CompressionAlgorithm import aws.smithy.kotlin.runtime.compression.Gzip @@ -59,6 +60,7 @@ class RequestCompressionInterceptorTest { return op.context.attributes[HttpOperationContext.HttpCallList].first() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCompressionThresholdTooHigh() = runTest { val payload = "bar" @@ -78,6 +80,7 @@ class RequestCompressionInterceptorTest { assertEquals(bytes, sentBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCompression() = runTest { val payload = "bar" @@ -98,6 +101,7 @@ class RequestCompressionInterceptorTest { assertContentEquals(bytes, decompressedBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSdkSource() = runTest { val payload = "bar" @@ -118,6 +122,7 @@ class RequestCompressionInterceptorTest { assertContentEquals(bytes, decompressedBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSdkByteReadChannel() = runTest { val payload = "bar" @@ -138,6 +143,7 @@ class RequestCompressionInterceptorTest { assertContentEquals(bytes, decompressedBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testHeaderAlreadySet() = runTest { val payload = "bar" @@ -159,6 +165,7 @@ class RequestCompressionInterceptorTest { assertContentEquals(bytes, decompressedBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNoSupportedAlgorithms() = runTest { val payload = "bar" @@ -178,6 +185,7 @@ class RequestCompressionInterceptorTest { assertEquals(bytes, sentBytes) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidCompressionThreshold() = runTest { val payload = "bar" diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/ResponseLengthValidationInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/ResponseLengthValidationInterceptorTest.kt index e9730f726c..4fa184459d 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/ResponseLengthValidationInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/interceptors/ResponseLengthValidationInterceptorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.http.interceptors +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.HttpCall import aws.smithy.kotlin.runtime.http.operation.* @@ -77,6 +78,7 @@ class ResponseLengthValidationInterceptorTest { private fun allBodies() = nonEmptyBodies() + HttpBody.Empty + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testCorrectLengthReturned() = runTest { nonEmptyBodies().forEach { body -> @@ -86,6 +88,7 @@ class ResponseLengthValidationInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNotEnoughBytesReturned() = runTest { nonEmptyBodies().forEach { body -> @@ -97,6 +100,7 @@ class ResponseLengthValidationInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testTooManyBytesReturned() = runTest { allBodies().forEach { body -> @@ -108,6 +112,7 @@ class ResponseLengthValidationInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNoContentLengthSkipsValidation() = runTest { allBodies().forEach { body -> @@ -117,6 +122,7 @@ class ResponseLengthValidationInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEmptyBodyCorrectLengthReturned() = runTest { val client = client(HttpBody.Empty, 0) // expect correct content length diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/DefaultValidateResponseTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/DefaultValidateResponseTest.kt index 71d1d67ce2..d8667ae65f 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/DefaultValidateResponseTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/DefaultValidateResponseTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.http.middleware +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpCall @@ -21,6 +22,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFailsWith class DefaultValidateResponseTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itThrowsExceptionOnNon200Response() = runTest { val mockEngine = TestEngine { _, request -> @@ -44,6 +46,7 @@ class DefaultValidateResponseTest { return@runTest } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itPassesSuccessResponses() = runTest { val mockEngine = TestEngine { _, request -> diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/MutateHeadersTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/MutateHeadersTest.kt index f97a982714..7d2632749d 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/MutateHeadersTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/MutateHeadersTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.middleware +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.SdkHttpClient import aws.smithy.kotlin.runtime.http.operation.HttpOperationContext @@ -20,6 +21,7 @@ import kotlin.test.assertEquals class MutateHeadersTest { private val client = SdkHttpClient(TestEngine()) + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itOverridesHeaders() = runTest { val req = HttpRequestBuilder().apply { @@ -50,6 +52,7 @@ class MutateHeadersTest { assertEquals("qux", call.request.headers["baz"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itAppendsHeaders() = runTest { val req = HttpRequestBuilder().apply { @@ -80,6 +83,7 @@ class MutateHeadersTest { assertEquals("qux", call.request.headers["baz"]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSetsMissing() = runTest { val req = HttpRequestBuilder().apply { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/RetryMiddlewareTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/RetryMiddlewareTest.kt index d80c48ab75..b2bb1bc816 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/RetryMiddlewareTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/middleware/RetryMiddlewareTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.middleware +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.collections.get import aws.smithy.kotlin.runtime.http.SdkHttpClient import aws.smithy.kotlin.runtime.http.operation.HttpOperationContext @@ -34,6 +35,7 @@ class RetryMiddlewareTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testRetryMiddleware() = runTest { val req = HttpRequestBuilder() diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorOrderTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorOrderTest.kt index 297b9db295..0a64190951 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorOrderTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorOrderTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.operation +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder @@ -135,6 +136,7 @@ class HttpInterceptorOrderTest { hooksFired.shouldContainInOrder(expected) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testInterceptorOrderSuccess() = runTest { // sanity test all hooks fire in order @@ -151,91 +153,109 @@ class HttpInterceptorOrderTest { assertEquals(expected, hooksFired) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadBeforeExecutionErrors() = runTest { simpleFailOrderTest("readBeforeExecution") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeSerializationErrors() = runTest { simpleFailOrderTest("modifyBeforeSerialization") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadBeforeSerializationErrors() = runTest { simpleFailOrderTest("readBeforeSerialization") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadAfterSerializationErrors() = runTest { simpleFailOrderTest("readAfterSerialization") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeRetryLoopErrors() = runTest { simpleFailOrderTest("modifyBeforeRetryLoop") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadBeforeAttemptErrors() = runTest { simpleFailOrderTest("readBeforeAttempt") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeSigningErrors() = runTest { simpleFailOrderTest("modifyBeforeSigning") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadBeforeSigningErrors() = runTest { simpleFailOrderTest("readBeforeSigning") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadAfterSigningErrors() = runTest { simpleFailOrderTest("readAfterSigning") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeTransmitErrors() = runTest { simpleFailOrderTest("modifyBeforeTransmit") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadBeforeTransmitErrors() = runTest { simpleFailOrderTest("readBeforeTransmit") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterTransmitErrors() = runTest { simpleFailOrderTest("readAfterTransmit") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadBeforeDeserializationErrors() = runTest { simpleFailOrderTest("readBeforeDeserialization") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterDeserializationErrors() = runTest { simpleFailOrderTest("readAfterDeserialization") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterAttemptErrors() = runTest { simpleFailOrderTest("readAfterAttempt") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testModifyBeforeAttemptCompletionErrors() = runTest { simpleFailOrderTest("modifyBeforeAttemptCompletion") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testModifyBeforeCompletionErrors() = runTest { simpleFailOrderTest("modifyBeforeCompletion") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterExecutionErrors() = runTest { simpleFailOrderTest("readAfterExecution") diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTest.kt index b03f099ccb..b2830268da 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.operation +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.client.* import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor @@ -151,6 +152,7 @@ class HttpInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testInterceptorModifications() = runTest { val serialized = HttpRequestBuilder().apply { @@ -173,6 +175,7 @@ class HttpInterceptorTest { assertEquals("final", output.value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testInterceptorModificationsWithRetries() = runTest { val serialized = HttpRequestBuilder().apply { @@ -211,6 +214,7 @@ class HttpInterceptorTest { assertEquals("ignore-failure", output.value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testMapFailureOnAttempt() = runTest { val interceptor = object : HttpInterceptor { @@ -223,6 +227,7 @@ class HttpInterceptorTest { testMapFailure(interceptor) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testMapFailureOnCompletion() = runTest { val interceptor = object : HttpInterceptor { @@ -235,6 +240,7 @@ class HttpInterceptorTest { testMapFailure(interceptor) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testReadAfterExecutionSuppressedException() = runTest { val interceptor = object : HttpInterceptor { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTypeValidationTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTypeValidationTest.kt index 7d2cd3d88f..e7847ff8fa 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTypeValidationTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/HttpInterceptorTypeValidationTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.operation +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.client.* import aws.smithy.kotlin.runtime.http.interceptors.HttpInterceptor import aws.smithy.kotlin.runtime.http.request.HttpRequest @@ -16,6 +17,7 @@ import kotlin.IllegalStateException import kotlin.test.* class HttpInterceptorTypeValidationTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeSerializationTypeFailure() = runTest { val i1 = object : HttpInterceptor { @@ -44,6 +46,7 @@ class HttpInterceptorTypeValidationTest { ex.message.shouldContain("modifyBeforeSerialization invalid type conversion: found class aws.smithy.kotlin.runtime.http.operation.TestOutput; expected class aws.smithy.kotlin.runtime.http.operation.TestInput") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeAttemptCompletionTypeFailure() = runTest { val i1 = object : HttpInterceptor { @@ -71,6 +74,7 @@ class HttpInterceptorTypeValidationTest { ex.message.shouldContain("modifyBeforeAttemptCompletion invalid type conversion: found class kotlin.String; expected class aws.smithy.kotlin.runtime.http.operation.TestOutput") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testModifyBeforeCompletionTypeFailure() = runTest { val i1 = object : HttpInterceptor { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkHttpOperationTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkHttpOperationTest.kt index 22e36d1cf1..59bbc66974 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkHttpOperationTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkHttpOperationTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.operation +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.SdkHttpClient import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder import aws.smithy.kotlin.runtime.httptest.TestEngine @@ -18,6 +19,7 @@ import kotlin.test.assertFailsWith import kotlin.test.assertNotNull class SdkHttpOperationTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testTelemetryInstrumentation() = runTest { val op = newTestOperation(HttpRequestBuilder(), Unit) @@ -31,6 +33,7 @@ class SdkHttpOperationTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testMissingRequiredProperties() = runTest { val ex = assertFailsWith { diff --git a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkOperationExecutionTest.kt b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkOperationExecutionTest.kt index 5b521d8bbf..33c394f8a5 100644 --- a/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkOperationExecutionTest.kt +++ b/runtime/protocol/http-client/common/test/aws/smithy/kotlin/runtime/http/operation/SdkOperationExecutionTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.operation +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.auth.AuthSchemeId import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody @@ -27,7 +28,7 @@ import kotlin.test.assertFalse import kotlin.test.assertTrue class SdkOperationExecutionTest { - + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testOperationMiddlewareOrder() = runTest { // sanity test middleware flows the way we expect diff --git a/runtime/protocol/http-test/common/test/aws/smithy/kotlin/runtime/httptest/TestConnectionTest.kt b/runtime/protocol/http-test/common/test/aws/smithy/kotlin/runtime/httptest/TestConnectionTest.kt index b8f0a41f15..c1cfa8ec28 100644 --- a/runtime/protocol/http-test/common/test/aws/smithy/kotlin/runtime/httptest/TestConnectionTest.kt +++ b/runtime/protocol/http-test/common/test/aws/smithy/kotlin/runtime/httptest/TestConnectionTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.httptest +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder import aws.smithy.kotlin.runtime.net.Host @@ -15,6 +16,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFails class TestConnectionTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testAssertRequestsSuccess() = runTest { val engine = buildTestConnection { @@ -42,6 +44,7 @@ class TestConnectionTest { engine.assertRequests() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testAssertRequestsUrlDifferent() = runTest { val engine = buildTestConnection { @@ -69,6 +72,7 @@ class TestConnectionTest { }.message.shouldContain("URL mismatch") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testAssertRequestsMissingHeader() = runTest { val engine = buildTestConnection { @@ -96,6 +100,7 @@ class TestConnectionTest { }.message.shouldContain("header `x-baz` missing value `qux`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun testAssertRequestsBodyDifferent() = runTest { val engine = buildTestConnection { @@ -124,6 +129,7 @@ class TestConnectionTest { }.message.shouldContain("body mismatch") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testAssertRequestsAny() = runTest { val engine = buildTestConnection { @@ -158,6 +164,7 @@ class TestConnectionTest { engine.assertRequests() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFromJson() = runTest { // language=JSON diff --git a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HeadersTest.kt b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HeadersTest.kt index 12287dcc8d..04cea1b3e6 100644 --- a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HeadersTest.kt +++ b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HeadersTest.kt @@ -4,13 +4,13 @@ */ package aws.smithy.kotlin.runtime.http +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFalse import kotlin.test.assertTrue class HeadersTest { - @Test fun itBuilds() { val actual = Headers { @@ -29,6 +29,7 @@ class HeadersTest { assertEquals("Headers [key=[value]]", "$actual2") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSubsequentModificationsDontAffectOriginal() { val builder = HeadersBuilder() diff --git a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpBodyTest.kt b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpBodyTest.kt index 844d054166..a76f8ddc9e 100644 --- a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpBodyTest.kt +++ b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpBodyTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.ByteStream import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.io.SdkByteChannel @@ -49,6 +50,7 @@ class HttpBodyTest { assertTrue(body.isOneShot) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testStreamingReadAllClosedForRead() = runTest { val expected = "foobar" @@ -61,6 +63,7 @@ class HttpBodyTest { assertEquals(expected, body.readAll()!!.decodeToString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testStreamingReadAllClosedForWrite() = runTest { val expected = "foobar" diff --git a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpRequestBuilderTest.kt b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpRequestBuilderTest.kt index 79675b689a..9954de1d6e 100644 --- a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpRequestBuilderTest.kt +++ b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/HttpRequestBuilderTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.http +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.ByteStream import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.request.HttpRequest @@ -41,6 +42,7 @@ class HttpRequestBuilderTest { assertEquals(HttpBody.Empty, request.body) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDumpRequest() = runTest { val content = "Mom!...Dad!...Bingo!...Bluey!" @@ -79,6 +81,7 @@ class HttpRequestBuilderTest { assertEquals(content, actualReplacedContent) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRequestToBuilder() = runTest { val req = HttpRequest( diff --git a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/response/HttpResponseTest.kt b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/response/HttpResponseTest.kt index 2f07d3cd5b..32c420fef3 100644 --- a/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/response/HttpResponseTest.kt +++ b/runtime/protocol/http/common/test/aws/smithy/kotlin/runtime/http/response/HttpResponseTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.http.response +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.ByteStream import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody @@ -36,6 +37,7 @@ class HttpResponseTest { assertEquals(HttpStatusCode.BadRequest, resp.statusCode()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDumpResponse() = runTest { val content = "Mom!...Dad!...Bingo!...Bluey!" diff --git a/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/RpcV2CborSmithyProtocolResponseHeaderInterceptorTest.kt b/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/RpcV2CborSmithyProtocolResponseHeaderInterceptorTest.kt index 1a795be3c8..02a330f5f3 100644 --- a/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/RpcV2CborSmithyProtocolResponseHeaderInterceptorTest.kt +++ b/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/RpcV2CborSmithyProtocolResponseHeaderInterceptorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.awsprotocol.rpcv2.cbor +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.ServiceException import aws.smithy.kotlin.runtime.http.* import aws.smithy.kotlin.runtime.http.operation.* @@ -55,6 +56,7 @@ internal fun getMockClient(response: ByteArray, responseHeaders: Headers = Heade internal val RESPONSE = "abc".repeat(1024).encodeToByteArray() class RpcV2CborSmithyProtocolResponseHeaderInterceptorTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testThrowsOnMissingHeader() = runTest { val req = HttpRequestBuilder() @@ -69,6 +71,7 @@ class RpcV2CborSmithyProtocolResponseHeaderInterceptorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSucceedsOnPresentHeader() = runTest { val req = HttpRequestBuilder() diff --git a/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/Rpcv2CborErrorDeserializerTest.kt b/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/Rpcv2CborErrorDeserializerTest.kt index b478925733..6357e782f0 100644 --- a/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/Rpcv2CborErrorDeserializerTest.kt +++ b/runtime/protocol/smithy-rpcv2-protocols/common/test/aws/smithy/kotlin/runtime/awsprotocol/rpcv2/cbor/Rpcv2CborErrorDeserializerTest.kt @@ -2,6 +2,7 @@ * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 */ +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.awsprotocol.rpcv2.cbor.RpcV2CborErrorDeserializer import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor @@ -14,6 +15,7 @@ import kotlin.test.Test import kotlin.test.assertEquals class RpcV2CborErrorDeserializerTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDeserializeErrorType() = runTest { val tests = listOf( diff --git a/runtime/runtime-core/api/runtime-core.api b/runtime/runtime-core/api/runtime-core.api index 942f99e348..d89ff828fb 100644 --- a/runtime/runtime-core/api/runtime-core.api +++ b/runtime/runtime-core/api/runtime-core.api @@ -21,6 +21,9 @@ public final class aws/smithy/kotlin/runtime/ErrorMetadata$Companion { public abstract interface annotation class aws/smithy/kotlin/runtime/ExperimentalApi : java/lang/annotation/Annotation { } +public abstract interface annotation class aws/smithy/kotlin/runtime/IgnoreNative : java/lang/annotation/Annotation { +} + public abstract interface annotation class aws/smithy/kotlin/runtime/InternalApi : java/lang/annotation/Annotation { } diff --git a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt index ee3ab01e28..30eed9afe4 100644 --- a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt +++ b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/Annotations.kt @@ -58,3 +58,9 @@ public annotation class ExperimentalApi */ @DslMarker public annotation class SdkDsl + +/** + * Marks a test that should be ignored on Native platforms + */ +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) +public expect annotation class IgnoreNative() diff --git a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/util/JMESPath.kt b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/util/JMESPath.kt index 2a7cdd9791..9b691a79a2 100644 --- a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/util/JMESPath.kt +++ b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/util/JMESPath.kt @@ -66,6 +66,7 @@ public fun Any?.type(): String = when (this) { else -> throw Exception("Undetected type for: $this") } +// Collection `flattenIfPossible` functions @InternalApi @JvmName("noOpUnnestedCollection") public inline fun Collection.flattenIfPossible(): Collection = this @@ -73,3 +74,12 @@ public inline fun Collection.flattenIfPossible(): Collection = @InternalApi @JvmName("flattenNestedCollection") public inline fun Collection>.flattenIfPossible(): Collection = flatten() + +// List `flattenIfPossible` functions +@InternalApi +@JvmName("noOpUnnestedCollection") +public inline fun List.flattenIfPossible(): List = this + +@InternalApi +@JvmName("flattenNestedCollection") +public inline fun List>.flattenIfPossible(): List = flatten() diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/collections/ReadThroughCacheTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/collections/ReadThroughCacheTest.kt index 4d85ece15f..0769c3049b 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/collections/ReadThroughCacheTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/collections/ReadThroughCacheTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.collections +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.time.ManualClock import aws.smithy.kotlin.runtime.util.ExpiringValue import kotlinx.coroutines.test.runTest @@ -13,6 +14,7 @@ import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds class ReadThroughCacheTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadThrough() = runTest { val clock = ManualClock() @@ -36,6 +38,7 @@ class ReadThroughCacheTest { assertEquals(3, cache.get("b") { uncachedValue() }) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSweep() = runTest { val clock = ManualClock() diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigDecimalTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigDecimalTest.kt index dcb828146c..d5d1fbbcca 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigDecimalTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigDecimalTest.kt @@ -4,11 +4,13 @@ */ package aws.smithy.kotlin.runtime.content +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFails class BigDecimalTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBigDecimal() { val reallyPreciseNumberString = "0.340282366920938463463374607431768211456" // 128 bits of magnitude @@ -16,11 +18,13 @@ class BigDecimalTest { assertEquals(reallyPreciseNumberString, reallyPreciseNumber.toPlainString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBadBigDecimal() { assertFails { BigDecimal("1234567890.1234567890foo") } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEquals() { val value = "0.340282366920938463463374607431768211456" diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigIntegerTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigIntegerTest.kt index 2dc9083025..47e3f61707 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigIntegerTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/BigIntegerTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.content +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.text.encoding.decodeHexBytes import kotlin.test.Test import kotlin.test.assertContentEquals @@ -11,6 +12,7 @@ import kotlin.test.assertEquals import kotlin.test.assertFails class BigIntegerTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBigInteger() { val reallyBigNumberString = "340282366920938463463374607431768211456" // 128-bit number @@ -18,17 +20,20 @@ class BigIntegerTest { assertEquals(reallyBigNumberString, reallyBigNumber.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBadBigInteger() { assertFails { BigInteger("1234567890foo1234567890") } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testEquals() { val value = "340282366920938463463374607431768211456" assertEquals(BigInteger(value), BigInteger(value)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testPlusOperator() { // Map of an expected value to a pair of two values that should sum to get that expected value @@ -47,6 +52,7 @@ class BigIntegerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testMinusOperator() { // Map of an expected value to a pair of two values that should subtract to get that expected value @@ -65,6 +71,7 @@ class BigIntegerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testByteOperations() { // Map of hexadecimal encoding of a big integer to the expected string representation of that big integer diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/ByteStreamFlowTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/ByteStreamFlowTest.kt index d4568a882c..1ddbc8e195 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/ByteStreamFlowTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/content/ByteStreamFlowTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.content +import aws.smithy.kotlin.runtime.IgnoreNative import io.kotest.matchers.string.shouldContain import kotlinx.coroutines.* import kotlinx.coroutines.channels.Channel @@ -18,6 +19,7 @@ class ByteStreamChannelSourceFlowTest : ByteStreamFlowTest(ByteStreamFactory.SDK abstract class ByteStreamFlowTest( private val factory: ByteStreamFactory, ) { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testToFlowWithSizeHint() = runTest { val data = "a korf is a tiger".repeat(1024).encodeToByteArray() @@ -57,6 +59,7 @@ abstract class ByteStreamFlowTest( testByteArray(3278), ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFlowToByteStreamReadAll() = runTest { val flow = data.asFlow() @@ -137,6 +140,7 @@ abstract class ByteStreamFlowTest( ch.closedCause?.message.shouldContain("scope cancelled") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testChannelCancellation() = runTest { // cancelling the channel should cancel the scope (via write failing) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ByteArraySourceTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ByteArraySourceTest.kt index dea0585f3e..de56a3b713 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ByteArraySourceTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ByteArraySourceTest.kt @@ -5,10 +5,12 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals class ByteArraySourceTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testByteArraySource() { val contents = "12345678".encodeToByteArray() diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipByteReadChannelTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipByteReadChannelTest.kt index 6c6f1884ee..ad1c9bf5b6 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipByteReadChannelTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipByteReadChannelTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.hashing.crc32 import kotlinx.coroutines.test.runTest import kotlin.test.Test @@ -11,6 +12,7 @@ import kotlin.test.assertContentEquals import kotlin.test.assertEquals class GzipByteReadChannelTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAll() = runTest { val payload = "Hello World" @@ -30,6 +32,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToBuffer() = runTest { val payload = "Hello World".repeat(1600) @@ -48,6 +51,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadRemaining() = runTest { val payload = "Hello World".repeat(1600) @@ -67,6 +71,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRead() = runTest { val payload = "Hello World" @@ -87,6 +92,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeBody() = runTest { val payload = "Hello World".repeat(1600) @@ -107,6 +113,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeLimit() = runTest { val payload = "Hello World" @@ -127,6 +134,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeBodyLargeLimit() = runTest { val payload = "Hello World".repeat(1600) @@ -147,6 +155,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testIsClosedForRead() = runTest { val payload = "Hello World" @@ -169,6 +178,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testIsClosedForReadLargeBody() = runTest { val payload = "Hello World".repeat(1600) @@ -191,6 +201,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testIsClosedForReadLargeLimit() = runTest { val payload = "Hello World" @@ -213,6 +224,7 @@ class GzipByteReadChannelTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testIsClosedForReadLargeBodyLargeLimit() = runTest { val payload = "Hello World".repeat(1600) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipSdkSourceTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipSdkSourceTest.kt index bfa47e012d..f36b671894 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipSdkSourceTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/GzipSdkSourceTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.hashing.crc32 import kotlinx.coroutines.test.runTest import kotlin.test.Test @@ -11,6 +12,7 @@ import kotlin.test.assertContentEquals import kotlin.test.assertEquals class GzipSdkSourceTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToByteArray() = runTest { val payload = "Hello World" @@ -28,6 +30,7 @@ class GzipSdkSourceTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRead() = runTest { val payload = "Hello World" @@ -48,6 +51,7 @@ class GzipSdkSourceTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeBody() = runTest { val payload = "Hello World".repeat(1600) @@ -69,6 +73,7 @@ class GzipSdkSourceTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeLimit() = runTest { val payload = "Hello World" @@ -89,6 +94,7 @@ class GzipSdkSourceTest { assertEquals(bytesHash, decompressedBytes.crc32()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLargeBodyLargeLimit() = runTest { val payload = "Hello World".repeat(1600) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingByteReadChannelTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingByteReadChannelTest.kt index 5d9b3eb74f..1ac4c8794c 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingByteReadChannelTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingByteReadChannelTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.hashing.toHashFunction import kotlinx.coroutines.test.runTest import kotlin.random.Random @@ -15,6 +16,7 @@ class HashingByteReadChannelTest { private val hashFunctionNames = listOf("crc32", "crc32c", "md5", "sha1", "sha256") + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAll() = runTest { hashFunctionNames.forEach { hashFunctionName -> @@ -35,6 +37,7 @@ class HashingByteReadChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToBuffer() = runTest { hashFunctionNames.forEach { hashFunctionName -> @@ -53,6 +56,7 @@ class HashingByteReadChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFully() = runTest { hashFunctionNames.forEach { hashFunctionName -> @@ -72,6 +76,7 @@ class HashingByteReadChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadRemaining() = runTest { hashFunctionNames.forEach { hashFunctionName -> @@ -91,6 +96,7 @@ class HashingByteReadChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRead() = runTest { hashFunctionNames.forEach { hashFunctionName -> diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSinkTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSinkTest.kt index c4070116bc..8d0121c375 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSinkTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSinkTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.hashing.toHashFunction import kotlin.test.Test import kotlin.test.assertEquals @@ -13,6 +14,7 @@ class HashingSinkTest { private val hashFunctionNames = listOf("crc32", "crc32c", "md5", "sha1", "sha256") + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testHashingSinkDigest() = run { hashFunctionNames.forEach { hashFunctionName -> @@ -31,6 +33,7 @@ class HashingSinkTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testHashingSinkPartialWrite() = run { hashFunctionNames.forEach { hashFunctionName -> diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSourceTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSourceTest.kt index 33e86615ec..70cfaef8e2 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSourceTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/HashingSourceTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.hashing.* import kotlin.test.Test import kotlin.test.assertEquals @@ -13,6 +14,7 @@ class HashingSourceTest { private val hashFunctionNames = listOf("crc32", "crc32c", "md5", "sha1", "sha256") + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testHashingSourceDigest() = run { hashFunctionNames.forEach { hashFunctionName -> @@ -32,6 +34,7 @@ class HashingSourceTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testHashingSourcePartialRead() = run { hashFunctionNames.forEach { hashFunctionName -> diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ObserversTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ObserversTest.kt index 4c6de56398..19a845039e 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ObserversTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/ObserversTest.kt @@ -5,12 +5,14 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.internal.SdkSinkObserver import aws.smithy.kotlin.runtime.io.internal.SdkSourceObserver import kotlin.test.Test import kotlin.test.assertEquals class ObserversTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSdkSourceObserver() { val source = SdkBuffer() @@ -33,6 +35,7 @@ class ObserversTest { assertEquals(sink.readUtf8(), observer.content.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSdkSinkObserver() { val sink = SdkSink.blackhole() diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSinkTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSinkTest.kt index b3a76321c0..3469c996fe 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSinkTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSinkTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertContentEquals import kotlin.test.assertEquals @@ -24,6 +25,7 @@ abstract class AbstractBufferedSinkTest( private val data = SdkBuffer() private val sink = factory(data) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteByte() { sink.writeByte(0xDE.toByte()) @@ -34,6 +36,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=deadbeef]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteShort() { sink.writeShort(0xdead.toShort()) @@ -42,6 +45,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=deadbeef]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteShortLe() { sink.writeShortLe(0xdead.toShort()) @@ -50,6 +54,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=addeefbe]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteInt() { sink.writeInt(0xdeadbeef.toInt()) @@ -57,6 +62,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=deadbeef]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteLe() { sink.writeIntLe(0xdeadbeef.toInt()) @@ -64,6 +70,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=efbeadde]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteLong() { sink.writeLong(-2401053092341600192) @@ -71,6 +78,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=deadbeef10203040]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteLongLe() { sink.writeLongLe(4625232074423315934) @@ -78,6 +86,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[hex=deadbeef10203040]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteString() { sink.writeUtf8("レップはボールです") @@ -85,6 +94,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("[text=レップはボールです]", data.toString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteSubstring() { sink.writeUtf8("a lep is a ball", start = 2, endExclusive = 10) @@ -92,6 +102,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("lep is a", data.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteAll() { val contents = "a tay is a hammer" @@ -102,6 +113,7 @@ abstract class AbstractBufferedSinkTest( assertEquals(contents.length.toLong(), rc) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadSourceFully() { val source = object : SdkSource by SdkBuffer() { @@ -116,6 +128,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("12341234", data.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteEof() { val source: SdkSource = SdkBuffer().apply { writeUtf8("1234") } @@ -124,6 +137,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("1234", data.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteExhausted() { val source: SdkSource = SdkBuffer() @@ -131,6 +145,7 @@ abstract class AbstractBufferedSinkTest( assertEquals(0, data.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteExplicitZero() { val source = object : SdkSource by SdkBuffer() { @@ -141,6 +156,7 @@ abstract class AbstractBufferedSinkTest( assertEquals(0, data.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testCloseFlushes() { sink.writeUtf8("a flix is a comb") @@ -148,6 +164,7 @@ abstract class AbstractBufferedSinkTest( assertEquals("a flix is a comb", data.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteByteArray() { val expected = bytes(0xde, 0xad, 0xbe, 0xef) @@ -157,6 +174,7 @@ abstract class AbstractBufferedSinkTest( assertContentEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteByteArrayOffset() { val expected = bytes(0xde, 0xad, 0xbe, 0xef) @@ -166,6 +184,7 @@ abstract class AbstractBufferedSinkTest( assertContentEquals(expected.sliceArray(2..3), actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteByteArrayOffsetAndLimit() { val expected = bytes(0xde, 0xad, 0xbe, 0xef) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSourceTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSourceTest.kt index 284f72808e..ed5430c8f2 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSourceTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkBufferedSourceTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.* /** @@ -56,6 +57,7 @@ abstract class BufferedSourceTest( source = pipe.source } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadBytes() { sink.write(bytes(0xde, 0xad, 0xbe, 0xef)) @@ -68,6 +70,7 @@ abstract class BufferedSourceTest( assertTrue(source.exhausted()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadEmpty() { assertFailsWith { @@ -75,6 +78,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadShort() { sink.write(bytes(0xde, 0xad, 0xbe, 0xef)) @@ -83,6 +87,7 @@ abstract class BufferedSourceTest( assertEquals(0xbeef.toShort(), source.readShort()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadShortLe() { sink.write(bytes(0xde, 0xad, 0xbe, 0xef)) @@ -91,6 +96,7 @@ abstract class BufferedSourceTest( assertEquals(0xefbe.toShort(), source.readShortLe()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadInt() { sink.write(bytes(0x0b, 0xad, 0xca, 0xfe)) @@ -98,6 +104,7 @@ abstract class BufferedSourceTest( assertEquals(0x0badcafe, source.readInt()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadIntLe() { sink.write(bytes(0x0b, 0xad, 0xca, 0xfe)) @@ -105,6 +112,7 @@ abstract class BufferedSourceTest( assertEquals(-20271861, source.readIntLe()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLong() { sink.write(bytes(0xde, 0xad, 0xbe, 0xef, 0x10, 0x20, 0x30, 0x40)) @@ -112,6 +120,7 @@ abstract class BufferedSourceTest( assertEquals(-2401053092341600192, source.readLong()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadLongLe() { sink.write(bytes(0xde, 0xad, 0xbe, 0xef, 0x10, 0x20, 0x30, 0x40)) @@ -119,6 +128,7 @@ abstract class BufferedSourceTest( assertEquals(4625232074423315934, source.readLongLe()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAll() { val content = "a lep is a ball" @@ -130,12 +140,14 @@ abstract class BufferedSourceTest( assertEquals(content, testSink.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAllExhaustedSource() { val testSink: SdkSink = SdkBuffer() assertEquals(0, source.readAll(testSink)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadExhausted() { val testSink = SdkBuffer() @@ -145,6 +157,7 @@ abstract class BufferedSourceTest( assertEquals(sizeBefore, testSink.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArray() { val expected = bytes(0xde, 0xad, 0xbe, 0xef) @@ -153,6 +166,7 @@ abstract class BufferedSourceTest( assertContentEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArrayLimit() { val expected = bytes(0xde, 0xad, 0xbe, 0xef) @@ -161,6 +175,7 @@ abstract class BufferedSourceTest( assertContentEquals(expected.sliceArray(0..1), actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArrayOffset() { val content = bytes(0xde, 0xad, 0xbe, 0xef) @@ -172,6 +187,7 @@ abstract class BufferedSourceTest( assertContentEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArrayOffsetAndLimit() { val content = bytes(0xde, 0xad, 0xbe, 0xef) @@ -183,6 +199,7 @@ abstract class BufferedSourceTest( assertContentEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArrayTooSmall() { // read into a byte array that is smaller than the available data which should result in a "short" read @@ -193,6 +210,7 @@ abstract class BufferedSourceTest( assertContentEquals(expected.sliceArray(0..2), testSink) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadByteArrayEOF() { // read into a byte array that is smaller than the available data which should result in a "short" read @@ -202,6 +220,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSkip() { val content = ByteArray(16 * 1024) { it.toByte() } @@ -213,6 +232,7 @@ abstract class BufferedSourceTest( assertContentEquals(content.sliceArray(8192 until content.size), actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testSkipNotEnoughData() { val content = ByteArray(1024) { it.toByte() } @@ -224,6 +244,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testPeek() { sink.writeUtf8("a flix is a comb") @@ -237,6 +258,7 @@ abstract class BufferedSourceTest( assertEquals(" is a comb", source.readUtf8(10)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testMultiplePeek() { sink.writeUtf8("a flix is a comb") @@ -254,6 +276,7 @@ abstract class BufferedSourceTest( assertEquals(" is a comb", source.readUtf8(10)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testLargePeek() { sink.writeUtf8("123456") @@ -274,6 +297,7 @@ abstract class BufferedSourceTest( assertTrue(source.exhausted()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInvalidatedPeek() { // peek is invalid after first call to source @@ -292,6 +316,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRequest() { sink.writeUtf8("123456789".repeat(1024)) @@ -302,6 +327,7 @@ abstract class BufferedSourceTest( assertFalse(source.request(1024 * 9 + 1)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRequire() { sink.writeUtf8("123456789".repeat(1024)) @@ -313,6 +339,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFully() { val data = "123456789".repeat(1024) @@ -324,6 +351,7 @@ abstract class BufferedSourceTest( assertEquals(data, dest.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyIllegalArgumentException() { val dest = SdkBuffer() @@ -332,6 +360,7 @@ abstract class BufferedSourceTest( } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyEOFException() { val data = "123456789".repeat(1024) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelSuspendTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelSuspendTest.kt index aad017ced9..1ad0543151 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelSuspendTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelSuspendTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.testing.ManualDispatchTestBase import io.kotest.matchers.string.shouldContain import kotlinx.coroutines.* @@ -29,6 +30,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { ch.cancel(CancellationException("Test finished")) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadBeforeAvailable() = runTest { // test readAvailable() suspends when no data is available @@ -59,6 +61,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(6) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterAvailable() = runTest { // test readAvailable() does NOT suspend when data is available @@ -86,6 +89,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(6) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullySuspends() = runTest { // test readFully() suspends when not enough data is available to satisfy the request @@ -115,6 +119,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(7) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAfterAvailableFully() = runTest { // test readFully() does NOT suspend when data is available to satisfy the request @@ -139,6 +144,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(5) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToEmpty() = runTest { // test read() does not suspend when length is zero @@ -152,6 +158,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(3) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToEmptyFromFailedChannel() = runTest { expect(1) @@ -163,6 +170,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadToEmptyFromClosedChannel() = runTest { expect(1) @@ -174,6 +182,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(3) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFromFailedChannel() = runTest { expect(1) @@ -185,6 +194,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFromClosedChannelNoSuspend() = runTest { expect(1) @@ -194,6 +204,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFromClosedChannelSuspend() = runTest { expect(1) @@ -213,6 +224,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(5) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyFromFailedChannel() = runTest { expect(1) @@ -224,6 +236,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyFromClosedChannel() = runTest { expect(1) @@ -235,6 +248,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadState() = runTest { assertFalse(ch.isClosedForWrite) @@ -254,6 +268,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { assertTrue(ch.isClosedForRead) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadRemaining() = runTest { expect(1) @@ -274,6 +289,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(6) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadInProgress() = runTest { expect(1) @@ -295,6 +311,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(5) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteInProgress() = runTest { val chan = SdkByteChannel(true, 8) @@ -321,6 +338,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(5) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyEof() = runTest { expect(1) @@ -340,6 +358,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(5) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testResumeReadFromFailedChannel() = runTest { expect(1) @@ -358,6 +377,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(4) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testResumeReadFromClosedChannelNoContent() = runTest { expect(1) @@ -374,6 +394,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(4) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testLargeTransfer() = runTest { val data = "a".repeat(262144) + "b".repeat(512) @@ -388,6 +409,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { assertEquals(data.length.toLong(), ch.totalBytesWritten) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteNoSuspend() = runTest { val chan = SdkByteChannel(false, 8) @@ -398,6 +420,7 @@ class SdkByteChannelSuspendTest : ManualDispatchTestBase() { finish(2) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testWriteSuspend() = runTest { val chan = SdkByteChannel(false, 8) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelTest.kt index d2d1435683..e129614f59 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/io/SdkByteChannelTest.kt @@ -5,18 +5,21 @@ package aws.smithy.kotlin.runtime.io +import aws.smithy.kotlin.runtime.IgnoreNative import kotlinx.coroutines.launch import kotlinx.coroutines.test.runTest import kotlinx.coroutines.yield import kotlin.test.* class SdkByteChannelTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testCreateAndClose() { val chan = SdkByteChannel(false) chan.close() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testAutoFlush() = runTest { SdkByteChannel(false).use { chan -> @@ -41,6 +44,7 @@ class SdkByteChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testClose() = runTest { val chan = SdkByteChannel(false) @@ -85,6 +89,7 @@ class SdkByteChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFromClosedChannel() = runTest { val chan = SdkByteReadChannel(byteArrayOf(1, 2, 3, 4, 5)) @@ -98,6 +103,7 @@ class SdkByteChannelTest { assertTrue { chan.isClosedForRead } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAvailableNoSuspend() = runTest { val chan = SdkByteReadChannel("world!".encodeToByteArray()) @@ -110,6 +116,7 @@ class SdkByteChannelTest { assertEquals("hello, world!", buffer.readUtf8()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadAvailableSuspend() = runTest { val chan = SdkByteChannel() @@ -132,6 +139,7 @@ class SdkByteChannelTest { job.join() } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testCloseableUse() = runTest { val chan = SdkByteChannel(true) @@ -153,6 +161,7 @@ class SdkByteChannelTest { assertTrue(chan.isClosedForRead) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadFullyFromFailedChannel() = runTest { // ensure that we attempt reading such that failures are propagate to caller @@ -165,6 +174,7 @@ class SdkByteChannelTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testReadRemainingFromFailedChannel() = runTest { // ensure that we attempt reading such that failures are propagate to caller diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/InstantTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/InstantTest.kt index 4c96d68dc5..64d6d86286 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/InstantTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/InstantTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.time +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertTrue @@ -61,6 +62,7 @@ class InstantTest { FromTest("2020-11-04T24:00:00Z", 1604534400, 0), ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFromIso8601() { for ((idx, test) in iso8601Tests.withIndex()) { @@ -99,6 +101,7 @@ class InstantTest { TimestampFormat.ISO_8601_CONDENSED_DATE to Iso8601FmtTest::expectedIso8601CondDate, ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFormatAsIso8601() { for ((idx, test) in iso8601FmtTests.withIndex()) { @@ -122,6 +125,7 @@ class InstantTest { FromTest("Thu, 05 Nov 2020 19:22:37 -1245", 1604650057, 0), ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFromRfc5322() { for ((idx, test) in rfc5322Tests.withIndex()) { @@ -139,6 +143,7 @@ class InstantTest { FmtTest(1604650057, 0, "Fri, 06 Nov 2020 08:07:37 GMT"), ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFormatAsRfc5322() { for ((idx, test) in rfc5322FmtTests.withIndex()) { @@ -157,6 +162,7 @@ class InstantTest { FmtTest(1604604157, 345_006_000, "1604604157.345006"), ) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFormatAsEpochSeconds() { for ((idx, test) in epochFmtTests.withIndex()) { @@ -167,6 +173,7 @@ class InstantTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testToEpochDouble() { val sec = 1604604157L @@ -177,6 +184,7 @@ class InstantTest { assertTrue(kotlin.math.abs(0.012345 - fracSecs) < 0.00001) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testGetCurrentTime() { val currentTime = Instant.now() @@ -186,6 +194,7 @@ class InstantTest { assertTrue(currentTime.epochSeconds > pastInstant) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testGetEpochMilliseconds() { val instant = Instant.fromEpochSeconds(1602878160, 200_000) @@ -197,6 +206,7 @@ class InstantTest { assertEquals(expected2, instantWithMilli.epochMilliseconds) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFromEpochMilliseconds() { val ts1 = 1602878160000L @@ -208,6 +218,7 @@ class InstantTest { assertEquals(expected2, Instant.fromEpochMilliseconds(ts2)) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNegativeFromEpochSeconds() { val timestamp = Instant.fromEpochSeconds(-806976000L) @@ -217,6 +228,7 @@ class InstantTest { // Select tests pulled from edge cases/tickets in the V2 Java SDK. // Always good to learn from others... class V2JavaSdkTests { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun v2JavaSdkTt0031561767() { val input = "Fri, 16 May 2014 23:56:46 GMT" @@ -228,6 +240,7 @@ class InstantTest { * Tests the Date marshalling and unmarshalling. Asserts that the value is * same before and after marshalling/unmarshalling */ + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun v2JavaSdkUnixTimestampRoundtrip() { // v2 sdk used currentTimeMillis(), instead we just hard code a value here @@ -252,6 +265,7 @@ class InstantTest { // been accepted by the parser. } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testPlusMinusDuration() { val start = Instant.fromEpochSeconds(1000, 1000) @@ -261,6 +275,7 @@ class InstantTest { assertEquals(Instant.fromEpochSeconds(990, 0), start - offset) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testRoundTripUtcOffset() { // sanity check we only ever emit UTC timestamps (e.g. round trip a response with UTC offset) @@ -279,6 +294,7 @@ class InstantTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testUntil() { val untilTests = mapOf( diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ManualClockTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ManualClockTest.kt index 0a4f50d4a7..d9430b9284 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ManualClockTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ManualClockTest.kt @@ -5,12 +5,14 @@ package aws.smithy.kotlin.runtime.time +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds class ManualClockTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testAdvance() { val epoch = 1634413920L diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ParseEpochTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ParseEpochTest.kt index 8aba9c6b36..736ae2a60a 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ParseEpochTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/time/ParseEpochTest.kt @@ -4,10 +4,12 @@ */ package aws.smithy.kotlin.runtime.time +import aws.smithy.kotlin.runtime.IgnoreNative import kotlin.test.Test import kotlin.test.assertEquals class ParseEpochTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itParsesEpochTimestamps() { val tests = listOf( diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/CachedValueTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/CachedValueTest.kt index 5a9897bb55..6a4f7fa07e 100644 --- a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/CachedValueTest.kt +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/CachedValueTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.util +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.time.Instant import aws.smithy.kotlin.runtime.time.ManualClock import kotlinx.coroutines.* @@ -15,6 +16,7 @@ import kotlin.test.* import kotlin.time.Duration.Companion.seconds class CachedValueTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNull() = runTest { val epoch = Instant.fromEpochSeconds(0) @@ -25,6 +27,7 @@ class CachedValueTest { assertNull(value.get()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testExpiration() = runTest { val epoch = Instant.fromEpochSeconds(0) @@ -41,6 +44,7 @@ class CachedValueTest { assertNull(value.get()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testExpirationBuffer() = runTest { val epoch = Instant.fromEpochSeconds(0) @@ -57,6 +61,7 @@ class CachedValueTest { assertNull(value.get()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testGetOrLoad() = runTest { val epoch = Instant.fromEpochSeconds(0) @@ -93,6 +98,7 @@ class CachedValueTest { assertEquals(2, count) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testClose() = runTest { val epoch = Instant.fromEpochSeconds(0) @@ -107,6 +113,7 @@ class CachedValueTest { assertFailsWith { value.get() } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun throwsAfterCloseDuringGetOrLoad() = runTest { val epoch = Instant.fromEpochSeconds(0) diff --git a/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/JmesPathTest.kt b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/JmesPathTest.kt new file mode 100644 index 0000000000..e867f1e8a1 --- /dev/null +++ b/runtime/runtime-core/common/test/aws/smithy/kotlin/runtime/util/JmesPathTest.kt @@ -0,0 +1,49 @@ +package aws.smithy.kotlin.runtime.util + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertTrue + +class JmesPathTest { + @Test + fun flattenNestedLists() { + val nestedList = listOf( + listOf(1, 2, 3), + listOf(4, 5), + listOf(6), + ) + val flattenedList = nestedList.flattenIfPossible() + assertEquals(listOf(1, 2, 3, 4, 5, 6), flattenedList) + } + + @Test + fun flattenEmptyNestedLists() { + val nestedList = listOf( + listOf(), + listOf(), + listOf(), + ) + val flattenedList = nestedList.flattenIfPossible() + assertTrue(flattenedList.isEmpty()) + } + + @Test + fun flattenNestedEmptyAndNonEmptyNestedLists() { + val nestedList = listOf( + listOf(1, 2), + listOf(), + listOf(3, 4, 5), + ) + val flattenedList = nestedList.flattenIfPossible() + assertEquals(listOf(1, 2, 3, 4, 5), flattenedList) + } + + @Test + fun flattenList() { + val nestedList = listOf( + listOf(1, 2, 3), + ) + val flattenedList = nestedList.flattenIfPossible() + assertEquals(listOf(1, 2, 3), flattenedList) + } +} diff --git a/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/AnnotationsJvm.kt b/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/AnnotationsJvm.kt new file mode 100644 index 0000000000..b18b1bec0b --- /dev/null +++ b/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/AnnotationsJvm.kt @@ -0,0 +1,9 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.smithy.kotlin.runtime + +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) +public actual annotation class IgnoreNative diff --git a/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/content/ByteStreamJVM.kt b/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/content/ByteStreamJVM.kt index 1d6124357a..5647ac15af 100644 --- a/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/content/ByteStreamJVM.kt +++ b/runtime/runtime-core/jvm/src/aws/smithy/kotlin/runtime/content/ByteStreamJVM.kt @@ -114,11 +114,30 @@ public fun ByteStream.Companion.fromInputStream( * @param contentLength If specified, indicates how many bytes remain in this stream. Defaults to `null`. */ public fun InputStream.asByteStream(contentLength: Long? = null): ByteStream.SourceStream { - val source = source() + if (markSupported() && contentLength != null) { + mark(contentLength.toInt()) + } + return object : ByteStream.SourceStream() { override val contentLength: Long? = contentLength override val isOneShot: Boolean = !markSupported() - override fun readFrom(): SdkSource = source + override fun readFrom(): SdkSource { + if (markSupported() && contentLength != null) { + reset() + mark(contentLength.toInt()) + return object : SdkSource by source() { + /* + * This is a no-op close to prevent body hashing from closing the underlying InputStream, which causes + * `IOException: Stream closed` on subsequent reads. Consider making [ByteStream.ChannelStream]/[ByteStream.SourceStream] + * (or possibly even [ByteStream] itself) implement [Closeable] to better handle closing streams. + * This should allow us to clean up our usage of [ByteStream.cancel()]. + */ + override fun close() { } + } + } + + return source() + } } } diff --git a/runtime/runtime-core/jvm/test/aws/smithy/kotlin/runtime/content/ByteStreamJVMTest.kt b/runtime/runtime-core/jvm/test/aws/smithy/kotlin/runtime/content/ByteStreamJVMTest.kt index 054387b2e5..e8324fb11f 100644 --- a/runtime/runtime-core/jvm/test/aws/smithy/kotlin/runtime/content/ByteStreamJVMTest.kt +++ b/runtime/runtime-core/jvm/test/aws/smithy/kotlin/runtime/content/ByteStreamJVMTest.kt @@ -5,8 +5,11 @@ package aws.smithy.kotlin.runtime.content +import aws.smithy.kotlin.runtime.io.readToByteArray import aws.smithy.kotlin.runtime.testing.RandomTempFile import kotlinx.coroutines.test.runTest +import java.io.BufferedInputStream +import java.io.ByteArrayInputStream import java.io.ByteArrayOutputStream import java.io.InputStream import java.io.OutputStream @@ -228,6 +231,31 @@ class ByteStreamJVMTest { assertFalse(sos.closed) } + // https://github.com/awslabs/aws-sdk-kotlin/issues/1473 + @Test + fun testReplayableInputStreamAsByteStream() = runTest { + val content = "Hello, Bytes!".encodeToByteArray() + val byteArrayIns = ByteArrayInputStream(content) + val nonReplayableIns = NonReplayableInputStream(byteArrayIns) + + // buffer the non-replayable stream, making it replayable... + val bufferedIns = BufferedInputStream(nonReplayableIns) + + val byteStream = bufferedIns.asByteStream(content.size.toLong()) + + // Test that it can be read at least twice (e.g. once for hashing the body, once for transmitting the body) + assertContentEquals(content, byteStream.readFrom().use { it.readToByteArray() }) + assertContentEquals(content, byteStream.readFrom().use { it.readToByteArray() }) + } + + private class NonReplayableInputStream(val inputStream: InputStream) : InputStream() { + override fun markSupported(): Boolean = false // not replayable + + override fun read(): Int = inputStream.read() + override fun mark(readlimit: Int) = inputStream.mark(readlimit) + override fun reset() = inputStream.reset() + } + private class StatusTrackingOutputStream(val os: OutputStream) : OutputStream() { var closed: Boolean = false diff --git a/runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/AnnotationsNative.kt b/runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/AnnotationsNative.kt new file mode 100644 index 0000000000..76c0ce0cef --- /dev/null +++ b/runtime/runtime-core/native/src/aws/smithy/kotlin/runtime/AnnotationsNative.kt @@ -0,0 +1,8 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +package aws.smithy.kotlin.runtime + +public actual typealias IgnoreNative = kotlin.test.Ignore diff --git a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerErrorTest.kt b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerErrorTest.kt index 70d11b6792..1ace81d9ef 100644 --- a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerErrorTest.kt +++ b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerErrorTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.serde.cbor +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor import aws.smithy.kotlin.runtime.serde.SerialKind @@ -14,6 +15,7 @@ import kotlin.test.Test import kotlin.test.assertFails class CborDeserializerErrorTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - major7 - float64 - incomplete float64 at end of buf`() { val payload = "0xfb00000000000000".toByteArray() @@ -26,6 +28,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - uint - 2 - arg len 2 greater than remaining buf len`() { val payload = "0x1900".toByteArray() @@ -38,6 +41,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - uint - 4 - arg len 4 greater than remaining buf len`() { val payload = "0x1a000000".toByteArray() @@ -50,6 +54,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - negint - 2 - arg len 2 greater than remaining buf len`() { val payload = "0x3900".toByteArray() @@ -62,6 +67,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - slice - 2 - arg len 2 greater than remaining buf len`() { val payload = "0x5900".toByteArray() @@ -74,6 +80,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - slice - 8 - arg len 8 greater than remaining buf len`() { val payload = "0x5b00000000000000".toByteArray() @@ -86,6 +93,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - tag - 2 - arg len 2 greater than remaining buf len`() { val payload = "0xd900".toByteArray() @@ -97,6 +105,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - tag - 4 - arg len 4 greater than remaining buf len`() { val payload = "0xda000000".toByteArray() @@ -108,6 +117,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - uint - unexpected minor value 31`() { val payload = "0x1f".toByteArray() @@ -120,6 +130,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - list - 1 - arg len 1 greater than remaining buf len`() { val payload = "0x98".toByteArray() @@ -134,6 +145,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - list - 4 - arg len 4 greater than remaining buf len`() { val payload = "0x9a000000".toByteArray() @@ -148,6 +160,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - list - 8 - arg len 8 greater than remaining buf len`() { val payload = "0x9b00000000000000".toByteArray() @@ -162,6 +175,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - map - 1 - arg len 1 greater than remaining buf len`() { val payload = "0xb8".toByteArray() @@ -177,6 +191,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - map - 4 - arg len 4 greater than remaining buf len`() { val payload = "0xba000000".toByteArray() @@ -192,6 +207,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - major7 - float32 - incomplete float32 at end of buf`() { val payload = "0xfa000000".toByteArray() @@ -204,6 +220,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - string - 2 - arg len 2 greater than remaining buf len`() { val payload = "0x7900".toByteArray() @@ -216,6 +233,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - list - 2 - arg len 2 greater than remaining buf len`() { val payload = "0x9900".toByteArray() @@ -230,6 +248,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - negint - unexpected minor value 31`() { val payload = "0x3f".toByteArray() @@ -242,6 +261,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - string - 8 - arg len 8 greater than remaining buf len`() { val payload = "0x7b00000000000000".toByteArray() @@ -254,6 +274,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - major7 - unexpected minor value 31`() { val payload = "0xff".toByteArray() @@ -266,6 +287,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - string - 1 - arg len 1 greater than remaining buf len`() { val payload = "0x78".toByteArray() @@ -278,6 +300,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - tag - unexpected minor value 31`() { val payload = "0xdf".toByteArray() @@ -289,6 +312,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - slice - 1 - arg len 1 greater than remaining buf len`() { val payload = "0x58".toByteArray() @@ -301,6 +325,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - slice - 4 - arg len 4 greater than remaining buf len`() { val payload = "0x5a000000".toByteArray() @@ -313,6 +338,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - map - 2 - arg len 2 greater than remaining buf len`() { val payload = "0xb900".toByteArray() @@ -328,6 +354,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - map - 8 - arg len 8 greater than remaining buf len`() { val payload = "0xbb00000000000000".toByteArray() @@ -343,6 +370,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - tag - 8 - arg len 8 greater than remaining buf len`() { val payload = "0xdb00000000000000".toByteArray() @@ -354,6 +382,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - uint - 1 - arg len 1 greater than remaining buf len`() { val payload = "0x18".toByteArray() @@ -366,6 +395,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - major7 - float16 - incomplete float16 at end of buf`() { val payload = "0xf900".toByteArray() @@ -378,6 +408,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - uint - 8 - arg len 8 greater than remaining buf len`() { val payload = "0x1b00000000000000".toByteArray() @@ -390,6 +421,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - negint - 1 - arg len 1 greater than remaining buf len`() { val payload = "0x38".toByteArray() @@ -402,6 +434,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - negint - 4 - arg len 4 greater than remaining buf len`() { val payload = "0x3a000000".toByteArray() @@ -414,6 +447,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - negint - 8 - arg len 8 greater than remaining buf len`() { val payload = "0x3b00000000000000".toByteArray() @@ -426,6 +460,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - string - 4 - arg len 4 greater than remaining buf len`() { val payload = "0x7a000000".toByteArray() @@ -438,6 +473,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidArgument - tag - 1 - arg len 1 greater than remaining buf len`() { val payload = "0xd8".toByteArray() @@ -449,6 +485,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidList - indefinite list - invalid item - arg len 1 greater than remaining buf len`() { val payload = "0x9f18".toByteArray() @@ -463,6 +500,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidList - list - eof after head - unexpected end of payload`() { val payload = "0x81".toByteArray() @@ -477,6 +515,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidList - list - invalid item - arg len 1 greater than remaining buf len`() { val payload = "0x8118".toByteArray() @@ -491,6 +530,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidList - indefinite list - no break - expected break marker`() { val payload = "0x9f".toByteArray() @@ -505,6 +545,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - map - non-string key - unexpected major type 0 for map key`() { val payload = "0xa100".toByteArray() @@ -520,6 +561,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - map - invalid key - slice len 1 greater than remaining buf len`() { val payload = "0xa17801".toByteArray() @@ -535,6 +577,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - map - invalid value - arg len 1 greater than remaining buf len`() { val payload = "0xa163666f6f18".toByteArray() @@ -550,6 +593,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - indefinite map - no break - expected break marker`() { val payload = "0xbf".toByteArray() @@ -565,6 +609,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - indefinite map - non-string key - unexpected major type 0 for map key`() { val payload = "0xbf00".toByteArray() @@ -580,6 +625,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - indefinite map - invalid key - slice len 1 greater than remaining buf len`() { val payload = "0xbf7801".toByteArray() @@ -595,6 +641,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - indefinite map - invalid value - arg len 1 greater than remaining buf len`() { val payload = "0xbf63666f6f18".toByteArray() @@ -610,6 +657,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidMap - map - eof after head - unexpected end of payload`() { val payload = "0xa1".toByteArray() @@ -625,6 +673,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - slice - invalid nested definite - decode subslice slice len 1 greater than remaining buf len`() { val payload = "0x5f5801".toByteArray() @@ -637,6 +686,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - string - no break - expected break marker`() { val payload = "0x7f".toByteArray() @@ -649,6 +699,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - string - invalid nested major - unexpected major type 2 in indefinite slice`() { val payload = "0x7f40".toByteArray() @@ -661,6 +712,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - string - nested indefinite - nested indefinite slice`() { val payload = "0x7f7f".toByteArray() @@ -673,6 +725,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - string - invalid nested definite - decode subslice - slice len 1 greater than remaining buf len`() { val payload = "0x7f7801".toByteArray() @@ -685,6 +738,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - slice - invalid nested major - unexpected major type 3 in indefinite slice`() { val payload = "0x5f60".toByteArray() @@ -697,6 +751,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - slice - no break - expected break marker`() { val payload = "0x5f".toByteArray() @@ -709,6 +764,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - slice - nested indefinite - nested indefinite slice`() { val payload = "0x5f5f".toByteArray() @@ -721,6 +777,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - string - 1 - not enough bytes - slice len 1 greater than remaining buf len`() { val payload = "0x7801".toByteArray() @@ -733,6 +790,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidSlice - slice - 1 - not enough bytes - slice len 1 greater than remaining buf len`() { val payload = "0x5801".toByteArray() @@ -745,6 +803,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidTag - invalid value - arg len 1 greater than remaining buf len`() { val payload = "0xc118".toByteArray() @@ -756,6 +815,7 @@ class CborDeserializerErrorTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `TestDecode_InvalidTag - eof - unexpected end of payload`() { val payload = "0xc1".toByteArray() diff --git a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerSuccessTest.kt b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerSuccessTest.kt index a9d4b0a7d1..03f52f0936 100644 --- a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerSuccessTest.kt +++ b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerSuccessTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.serde.cbor +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor import aws.smithy.kotlin.runtime.serde.SerialKind @@ -24,6 +25,7 @@ internal fun String.toByteArray(): ByteArray = this .toByteArray() class CborDeserializerSuccessTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - undefined`() { val payload = "0xf7".toByteArray() @@ -35,6 +37,7 @@ class CborDeserializerSuccessTest { assertEquals(null, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float64 - 1dot625`() { val payload = "0xfb3ffa000000000000".toByteArray() @@ -46,6 +49,7 @@ class CborDeserializerSuccessTest { assertEquals(1.625, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 0 - max`() { val payload = "0x17".toByteArray() @@ -57,6 +61,7 @@ class CborDeserializerSuccessTest { assertEquals(23, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 8 - min`() { val payload = "0x1b0000000000000000".toByteArray() @@ -68,6 +73,7 @@ class CborDeserializerSuccessTest { assertEquals(0uL, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 8 - max`() { val payload = "0x1bffffffffffffffff".toByteArray() @@ -76,6 +82,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, aws.smithy.kotlin.runtime.serde.cbor.encoding.UInt.decode(buffer).value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 8 - min`() { val payload = "0x3b0000000000000000".toByteArray() @@ -87,6 +94,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - true`() { val payload = "0xf5".toByteArray() @@ -98,6 +106,7 @@ class CborDeserializerSuccessTest { assertEquals(true, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 4 - min`() { val payload = "0x1a00000000".toByteArray() @@ -109,6 +118,7 @@ class CborDeserializerSuccessTest { assertEquals(0, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 4 - max`() { val payload = "0x1affffffff".toByteArray() @@ -118,6 +128,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MAX_VALUE, aws.smithy.kotlin.runtime.serde.cbor.encoding.UInt.decode(buffer).value.toUInt()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 1 - min`() { val payload = "0x3800".toByteArray() @@ -129,6 +140,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float16 - subnormal`() { val payload = "0xf90050".toByteArray() @@ -140,6 +152,7 @@ class CborDeserializerSuccessTest { assertEquals(4.7683716E-6f, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float16 - NaN - LSB`() { val payload = "0xf97c01".toByteArray() @@ -151,6 +164,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 1 - min`() { val payload = "0x1800".toByteArray() @@ -162,6 +176,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MIN_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 0 - min`() { val payload = "0x20".toByteArray() @@ -173,6 +188,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float16 - -Inf`() { val payload = "0xf9fc00".toByteArray() @@ -184,6 +200,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NEGATIVE_INFINITY, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 8 - max`() { val payload = "0x3bfffffffffffffffe".toByteArray() @@ -192,6 +209,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 0 - min`() { val payload = "0x00".toByteArray() @@ -203,6 +221,7 @@ class CborDeserializerSuccessTest { assertEquals(0u, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 1 - max`() { val payload = "0x18ff".toByteArray() @@ -211,6 +230,7 @@ class CborDeserializerSuccessTest { assertEquals(255u, aws.smithy.kotlin.runtime.serde.cbor.encoding.UInt.decode(buffer).value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 2 - min`() { val payload = "0x190000".toByteArray() @@ -222,6 +242,7 @@ class CborDeserializerSuccessTest { assertEquals(0u, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 1 - max`() { val payload = "0x38ff".toByteArray() @@ -233,6 +254,7 @@ class CborDeserializerSuccessTest { assertEquals(-256, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 2 - min`() { val payload = "0x390000".toByteArray() @@ -244,6 +266,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float64 - +Inf`() { val payload = "0xfb7ff0000000000000".toByteArray() @@ -255,6 +278,7 @@ class CborDeserializerSuccessTest { assertEquals(Double.fromBits(9218868437227405312), result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 4 - min`() { val payload = "0x3a00000000".toByteArray() @@ -266,6 +290,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 4 - max`() { val payload = "0x3affffffff".toByteArray() @@ -278,6 +303,7 @@ class CborDeserializerSuccessTest { assertEquals(res, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float16 - NaN - MSB`() { val payload = "0xf97e00".toByteArray() @@ -289,6 +315,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float32 - +Inf`() { val payload = "0xfa7f800000".toByteArray() @@ -300,6 +327,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - uint - 2 - max`() { val payload = "0x19ffff".toByteArray() @@ -308,6 +336,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MAX_VALUE, aws.smithy.kotlin.runtime.serde.cbor.encoding.UInt.decode(buffer).value.toUShort()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 2 - max`() { val payload = "0x39ffff".toByteArray() @@ -316,6 +345,7 @@ class CborDeserializerSuccessTest { assertEquals(65536u, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - false`() { val payload = "0xf4".toByteArray() @@ -327,6 +357,7 @@ class CborDeserializerSuccessTest { assertEquals(false, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - null`() { val payload = "0xf6".toByteArray() @@ -338,6 +369,7 @@ class CborDeserializerSuccessTest { assertEquals(null, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - negint - 0 - max`() { val payload = "0x37".toByteArray() @@ -349,6 +381,7 @@ class CborDeserializerSuccessTest { assertEquals(-24, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float16 - +Inf`() { val payload = "0xf97c00".toByteArray() @@ -360,6 +393,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `atomic - float32 - 1dot625`() { val payload = "0xfa3fd00000".toByteArray() @@ -371,6 +405,7 @@ class CborDeserializerSuccessTest { assertEquals(1.625f, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `definite slice - len = 0`() { val payload = "0x40".toByteArray() @@ -382,6 +417,7 @@ class CborDeserializerSuccessTest { assertEquals(0, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `definite slice - len greater than 0`() { val payload = "0x43666f6f".toByteArray() @@ -398,6 +434,7 @@ class CborDeserializerSuccessTest { assertEquals(3, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `definite string - len = 0`() { val payload = "0x60".toByteArray() @@ -409,6 +446,7 @@ class CborDeserializerSuccessTest { assertEquals("", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `definite string - len greater than 0`() { val payload = "0x63666f6f".toByteArray() @@ -420,6 +458,7 @@ class CborDeserializerSuccessTest { assertEquals("foo", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite slice - len greater than 0`() { val payload = "0x5f43666f6f40ff".toByteArray() @@ -436,6 +475,7 @@ class CborDeserializerSuccessTest { assertEquals(3, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite slice - len greater than 0 - len greater than 0`() { val payload = "0x5f43666f6f43666f6fff".toByteArray() @@ -450,6 +490,7 @@ class CborDeserializerSuccessTest { assertEquals(expected.size, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite slice - len = 0`() { val payload = "0x5fff".toByteArray() @@ -461,6 +502,7 @@ class CborDeserializerSuccessTest { assertEquals(0, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite slice - len = 0 explicit`() { val payload = "0x5f40ff".toByteArray() @@ -472,6 +514,7 @@ class CborDeserializerSuccessTest { assertEquals(0, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite slice - len = 0 - len greater than 0`() { val payload = "0x5f4043666f6fff".toByteArray() @@ -486,6 +529,7 @@ class CborDeserializerSuccessTest { assertEquals(expected.size, result.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite string - len = 0`() { val payload = "0x7fff".toByteArray() @@ -497,6 +541,7 @@ class CborDeserializerSuccessTest { assertEquals("", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite string - len = 0 - explicit`() { val payload = "0x7f60ff".toByteArray() @@ -508,6 +553,7 @@ class CborDeserializerSuccessTest { assertEquals("", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite string - len = 0 - len greater than 0`() { val payload = "0x7f6063666f6fff".toByteArray() @@ -519,6 +565,7 @@ class CborDeserializerSuccessTest { assertEquals("foo", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite string - len greater than 0 - len = 0`() { val payload = "0x7f63666f6f60ff".toByteArray() @@ -530,6 +577,7 @@ class CborDeserializerSuccessTest { assertEquals("foo", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite string - len greater than 0 - len greater than 0`() { val payload = "0x7f63666f6f63666f6fff".toByteArray() @@ -541,6 +589,7 @@ class CborDeserializerSuccessTest { assertEquals("foofoo", result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of one uint - 1 - max`() { val payload = "0x8118ff".toByteArray() @@ -558,6 +607,7 @@ class CborDeserializerSuccessTest { assertEquals(255u, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of one uint - 8 - min`() { val payload = "0x811b0000000000000000".toByteArray() @@ -575,6 +625,7 @@ class CborDeserializerSuccessTest { assertEquals(0, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 1 - min`() { val payload = "0x9f1800ff".toByteArray() @@ -592,6 +643,7 @@ class CborDeserializerSuccessTest { assertEquals(0u, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 2 - max`() { val payload = "0x9f19ffffff".toByteArray() @@ -609,6 +661,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MAX_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 2 - min`() { val payload = "0x9f390000ff".toByteArray() @@ -626,6 +679,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 4 - max`() { val payload = "0x811affffffff".toByteArray() @@ -643,6 +697,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MAX_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 8 - min`() { val payload = "0x9f1b0000000000000000ff".toByteArray() @@ -660,6 +715,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 2 - max`() { val payload = "0x9f39ffffff".toByteArray() @@ -677,6 +733,7 @@ class CborDeserializerSuccessTest { assertEquals(-65536, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float16 - NaN - LSB`() { val payload = "0x9ff97c01ff".toByteArray() @@ -694,6 +751,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 1 - max`() { val payload = "0x8138ff".toByteArray() @@ -711,6 +769,7 @@ class CborDeserializerSuccessTest { assertEquals(-256, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 2 - min`() { val payload = "0x81390000".toByteArray() @@ -728,6 +787,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of null`() { val payload = "0x81f6".toByteArray() @@ -741,6 +801,7 @@ class CborDeserializerSuccessTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float16 -Inf`() { val payload = "0x81f9fc00".toByteArray() @@ -758,6 +819,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NEGATIVE_INFINITY, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 4 - min`() { val payload = "0x9f1a00000000ff".toByteArray() @@ -775,6 +837,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 1 - min`() { val payload = "0x811800".toByteArray() @@ -792,6 +855,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 0 - max`() { val payload = "0x9f17ff".toByteArray() @@ -809,6 +873,7 @@ class CborDeserializerSuccessTest { assertEquals(23u, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 0 - min`() { val payload = "0x9f20ff".toByteArray() @@ -826,6 +891,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 1 - max`() { val payload = "0x9f38ffff".toByteArray() @@ -843,6 +909,7 @@ class CborDeserializerSuccessTest { assertEquals(-256, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of null`() { val payload = "0x9ff6ff".toByteArray() @@ -856,6 +923,7 @@ class CborDeserializerSuccessTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 1 - max`() { val payload = "0x9f18ffff".toByteArray() @@ -873,6 +941,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MAX_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 4 - max`() { val payload = "0x9f1affffffffff".toByteArray() @@ -890,6 +959,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MAX_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of _ uint - 8 - max`() { val payload = "0x9f1bffffffffffffffffff".toByteArray() @@ -912,6 +982,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of boolean true`() { val payload = "0x9ff5ff".toByteArray() @@ -929,6 +1000,7 @@ class CborDeserializerSuccessTest { assertEquals(true, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of undefined`() { val payload = "0x9ff7ff".toByteArray() @@ -946,6 +1018,7 @@ class CborDeserializerSuccessTest { assertEquals(0, actual.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 0 - max`() { val payload = "0x8117".toByteArray() @@ -963,6 +1036,7 @@ class CborDeserializerSuccessTest { assertEquals(23u, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 8 - max`() { val payload = "0x811bffffffffffffffff".toByteArray() @@ -983,6 +1057,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 0 - min`() { val payload = "0x8120".toByteArray() @@ -1000,6 +1075,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 0 - max`() { val payload = "0x8137".toByteArray() @@ -1017,6 +1093,7 @@ class CborDeserializerSuccessTest { assertEquals(-24, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 4 - min`() { val payload = "0x813a00000000".toByteArray() @@ -1034,6 +1111,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of boolean true`() { val payload = "0x81f5".toByteArray() @@ -1051,6 +1129,7 @@ class CborDeserializerSuccessTest { assertEquals(true, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float32`() { val payload = "0x81fa7f800000".toByteArray() @@ -1068,6 +1147,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.fromBits(2139095040), actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float64`() { val payload = "0x81fb7ff0000000000000".toByteArray() @@ -1085,6 +1165,7 @@ class CborDeserializerSuccessTest { assertEquals(Double.fromBits(9218868437227405312), actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 2 - min`() { val payload = "0x9f190000ff".toByteArray() @@ -1102,6 +1183,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float16 - NaN - MSB`() { val payload = "0x9ff97e00ff".toByteArray() @@ -1119,6 +1201,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 0 - max`() { val payload = "0x9f37ff".toByteArray() @@ -1136,6 +1219,7 @@ class CborDeserializerSuccessTest { assertEquals(-24, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 1 - min`() { val payload = "0x9f3800ff".toByteArray() @@ -1153,6 +1237,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 8 - min`() { val payload = "0x9f3b0000000000000000ff".toByteArray() @@ -1170,6 +1255,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 8 - max`() { val payload = "0x9f3bfffffffffffffffeff".toByteArray() @@ -1191,6 +1277,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of boolean false`() { val payload = "0x81f4".toByteArray() @@ -1208,6 +1295,7 @@ class CborDeserializerSuccessTest { assertEquals(false, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of uint - 0 - min`() { val payload = "0x9f00ff".toByteArray() @@ -1225,6 +1313,7 @@ class CborDeserializerSuccessTest { assertEquals(0, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 4 - min`() { val payload = "0x9f3a00000000ff".toByteArray() @@ -1242,6 +1331,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of negint - 4 - max`() { val payload = "0x9f3affffffffff".toByteArray() @@ -1259,6 +1349,7 @@ class CborDeserializerSuccessTest { assertEquals(-4294967296, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float16 - +Inf`() { val payload = "0x9ff97c00ff".toByteArray() @@ -1276,6 +1367,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 0 - min`() { val payload = "0x8100".toByteArray() @@ -1293,6 +1385,7 @@ class CborDeserializerSuccessTest { assertEquals(0u, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 1 - min`() { val payload = "0x813800".toByteArray() @@ -1310,6 +1403,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float16 - -Inf`() { val payload = "0x9ff9fc00ff".toByteArray() @@ -1327,6 +1421,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NEGATIVE_INFINITY, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float32`() { val payload = "0x9ffa7f800000ff".toByteArray() @@ -1344,6 +1439,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.fromBits(2139095040), actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 2 - min`() { val payload = "0x81190000".toByteArray() @@ -1361,6 +1457,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 4 - min`() { val payload = "0x811a00000000".toByteArray() @@ -1378,6 +1475,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MIN_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float16 - +Inf`() { val payload = "0x81f97c00".toByteArray() @@ -1395,6 +1493,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of float64`() { val payload = "0x9ffb7ff0000000000000ff".toByteArray() @@ -1412,6 +1511,7 @@ class CborDeserializerSuccessTest { assertEquals(Double.fromBits(9218868437227405312), actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float16 - NaN - MSB`() { val payload = "0x81f97e00".toByteArray() @@ -1429,6 +1529,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of float16 - NaN - LSB`() { val payload = "0x81f97c01".toByteArray() @@ -1446,6 +1547,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite list of boolean false`() { val payload = "0x9ff4ff".toByteArray() @@ -1463,6 +1565,7 @@ class CborDeserializerSuccessTest { assertEquals(false, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 8 - min`() { val payload = "0x813b0000000000000000".toByteArray() @@ -1480,6 +1583,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 8 - max`() { val payload = "0x813bfffffffffffffffe".toByteArray() @@ -1501,6 +1605,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of undefined`() { val payload = "0x81f7".toByteArray() @@ -1514,6 +1619,7 @@ class CborDeserializerSuccessTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of uint - 2 - max`() { val payload = "0x8119ffff".toByteArray() @@ -1531,6 +1637,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MAX_VALUE, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 2 - max`() { val payload = "0x8139ffff".toByteArray() @@ -1548,6 +1655,7 @@ class CborDeserializerSuccessTest { assertEquals(-65536, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `list of negint - 4 - max`() { val payload = "0x813affffffff".toByteArray() @@ -1565,6 +1673,7 @@ class CborDeserializerSuccessTest { assertEquals(-4294967296, actual[0]) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - _ uint - 8 - max`() { val payload = "0xbf63666f6f1bffffffffffffffffff".toByteArray() @@ -1588,6 +1697,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of null`() { val payload = "0xa163666f6ff6".toByteArray() @@ -1606,6 +1716,7 @@ class CborDeserializerSuccessTest { assertEquals(null, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - _ negint - 4 - max`() { val payload = "0xbf63666f6f3affffffffff".toByteArray() @@ -1624,6 +1735,7 @@ class CborDeserializerSuccessTest { assertEquals(-4294967296, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - _ float16 - -Inf`() { val payload = "0xbf63666f6ff9fc00ff".toByteArray() @@ -1642,6 +1754,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NEGATIVE_INFINITY, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 2 - max`() { val payload = "0xa163666f6f19ffff".toByteArray() @@ -1660,6 +1773,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - negint - 1 - min`() { val payload = "0xa163666f6f3800".toByteArray() @@ -1678,6 +1792,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of undefined`() { val payload = "0xbf63666f6ff7ff".toByteArray() @@ -1696,6 +1811,7 @@ class CborDeserializerSuccessTest { assertEquals(null, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 0 - max`() { val payload = "0xa163666f6f17".toByteArray() @@ -1714,6 +1830,7 @@ class CborDeserializerSuccessTest { assertEquals(23, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 0 - max`() { val payload = "0xbf63666f6f17ff".toByteArray() @@ -1732,6 +1849,7 @@ class CborDeserializerSuccessTest { assertEquals(23, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 1 - min`() { val payload = "0xbf63666f6f1800ff".toByteArray() @@ -1750,6 +1868,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 8 - min`() { val payload = "0xbf63666f6f1b0000000000000000ff".toByteArray() @@ -1768,6 +1887,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 8 - max`() { val payload = "0xbf63666f6f3bfffffffffffffffeff".toByteArray() @@ -1791,6 +1911,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 2 - min`() { val payload = "0xa163666f6f190000".toByteArray() @@ -1809,6 +1930,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of float16 - NaN - MSB`() { val payload = "0xbf63666f6ff97e00ff".toByteArray() @@ -1827,6 +1949,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - negint - 0 - min`() { val payload = "0xa163666f6f20".toByteArray() @@ -1845,6 +1968,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - float16 - -Inf`() { val payload = "0xa163666f6ff9fc00".toByteArray() @@ -1863,6 +1987,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NEGATIVE_INFINITY, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 1 - max`() { val payload = "0xbf63666f6f38ffff".toByteArray() @@ -1881,6 +2006,7 @@ class CborDeserializerSuccessTest { assertEquals(-256, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 8 - min`() { val payload = "0xbf63666f6f3b0000000000000000ff".toByteArray() @@ -1899,6 +2025,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 1 - min`() { val payload = "0xa163666f6f1800".toByteArray() @@ -1917,6 +2044,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 2 - min`() { val payload = "0xbf63666f6f190000ff".toByteArray() @@ -1935,6 +2063,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 2 - max`() { val payload = "0xbf63666f6f19ffffff".toByteArray() @@ -1953,6 +2082,7 @@ class CborDeserializerSuccessTest { assertEquals(UShort.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 0 - max`() { val payload = "0xbf63666f6f37ff".toByteArray() @@ -1971,6 +2101,7 @@ class CborDeserializerSuccessTest { assertEquals(-24, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 2 - max`() { val payload = "0xbf63666f6f39ffffff".toByteArray() @@ -1989,6 +2120,7 @@ class CborDeserializerSuccessTest { assertEquals(-65536, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of boolean true`() { val payload = "0xa163666f6ff5".toByteArray() @@ -2007,6 +2139,7 @@ class CborDeserializerSuccessTest { assertEquals(true, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of boolean true`() { val payload = "0xbf63666f6ff5ff".toByteArray() @@ -2025,6 +2158,7 @@ class CborDeserializerSuccessTest { assertEquals(true, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of boolean false`() { val payload = "0xbf63666f6ff4ff".toByteArray() @@ -2043,6 +2177,7 @@ class CborDeserializerSuccessTest { assertEquals(false, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 8 - max`() { val payload = "0xa163666f6f1bffffffffffffffff".toByteArray() @@ -2066,6 +2201,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - float16 - NaN - LSB`() { val payload = "0xa163666f6ff97c01".toByteArray() @@ -2084,6 +2220,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 0 - min`() { val payload = "0xbf63666f6f00ff".toByteArray() @@ -2102,6 +2239,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 4 - min`() { val payload = "0xbf63666f6f3a00000000ff".toByteArray() @@ -2120,6 +2258,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of float32`() { val payload = "0xbf63666f6ffa7f800000ff".toByteArray() @@ -2138,6 +2277,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.fromBits(2139095040), actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of uint - 0 - min`() { val payload = "0xa163666f6f00".toByteArray() @@ -2156,6 +2296,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - negint - 1 - max`() { val payload = "0xa163666f6f38ff".toByteArray() @@ -2174,6 +2315,7 @@ class CborDeserializerSuccessTest { assertEquals(-256, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - float64`() { val payload = "0xa163666f6ffb7ff0000000000000".toByteArray() @@ -2192,6 +2334,7 @@ class CborDeserializerSuccessTest { assertEquals(Double.fromBits(9218868437227405312), actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of float16 - NaN - LSB`() { val payload = "0xbf63666f6ff97c01ff".toByteArray() @@ -2210,6 +2353,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 8 - min`() { val payload = "0xa163666f6f1b0000000000000000".toByteArray() @@ -2228,6 +2372,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - negint - 8 - max`() { val payload = "0xa163666f6f3bfffffffffffffffe".toByteArray() @@ -2251,6 +2396,7 @@ class CborDeserializerSuccessTest { assertEquals(ULong.MAX_VALUE, result) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of undefined`() { val payload = "0xa163666f6ff7".toByteArray() @@ -2269,6 +2415,7 @@ class CborDeserializerSuccessTest { assertEquals(null, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of float16 - NaN - MSB`() { val payload = "0xa163666f6ff97e00".toByteArray() @@ -2287,6 +2434,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.NaN, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of negint - 8 - min`() { val payload = "0xa163666f6f3b0000000000000000".toByteArray() @@ -2305,6 +2453,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 4 - max`() { val payload = "0xbf63666f6f1affffffffff".toByteArray() @@ -2323,6 +2472,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 1 - min`() { val payload = "0xbf63666f6f3800ff".toByteArray() @@ -2341,6 +2491,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of float16 - +Inf`() { val payload = "0xbf63666f6ff97c00ff".toByteArray() @@ -2359,6 +2510,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - negint - 2 - min`() { val payload = "0xa163666f6f390000".toByteArray() @@ -2377,6 +2529,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of false`() { val payload = "0xa163666f6ff4".toByteArray() @@ -2395,6 +2548,7 @@ class CborDeserializerSuccessTest { assertEquals(false, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of float32`() { val payload = "0xa163666f6ffa7f800000".toByteArray() @@ -2413,6 +2567,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.fromBits(2139095040), actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 1 - max`() { val payload = "0xbf63666f6f18ffff".toByteArray() @@ -2431,6 +2586,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of negint - 0 - max`() { val payload = "0xa163666f6f37".toByteArray() @@ -2449,6 +2605,7 @@ class CborDeserializerSuccessTest { assertEquals(-24, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of negint - 4 - max`() { val payload = "0xa163666f6f3affffffff".toByteArray() @@ -2467,6 +2624,7 @@ class CborDeserializerSuccessTest { assertEquals(-4294967296, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of float16 - +Inf`() { val payload = "0xa163666f6ff97c00".toByteArray() @@ -2485,6 +2643,7 @@ class CborDeserializerSuccessTest { assertEquals(Float.POSITIVE_INFINITY, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of float64`() { val payload = "0xbf63666f6ffb7ff0000000000000ff".toByteArray() @@ -2503,6 +2662,7 @@ class CborDeserializerSuccessTest { assertEquals(Double.fromBits(9218868437227405312), actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of uint - 1 - max`() { val payload = "0xa163666f6f18ff".toByteArray() @@ -2521,6 +2681,7 @@ class CborDeserializerSuccessTest { assertEquals(UByte.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map - uint - 4 - max`() { val payload = "0xa163666f6f1affffffff".toByteArray() @@ -2539,6 +2700,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MAX_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of negint - 2 - max`() { val payload = "0xa163666f6f39ffff".toByteArray() @@ -2557,6 +2719,7 @@ class CborDeserializerSuccessTest { assertEquals(-65536, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of uint - 4 - min`() { val payload = "0xbf63666f6f1a00000000ff".toByteArray() @@ -2575,6 +2738,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 0 - min`() { val payload = "0xbf63666f6f20ff".toByteArray() @@ -2593,6 +2757,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of null`() { val payload = "0xbf63666f6ff6ff".toByteArray() @@ -2611,6 +2776,7 @@ class CborDeserializerSuccessTest { assertEquals(null, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of uint - 4 - min`() { val payload = "0xa163666f6f1a00000000".toByteArray() @@ -2629,6 +2795,7 @@ class CborDeserializerSuccessTest { assertEquals(UInt.MIN_VALUE, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `map of negint - 4 - min`() { val payload = "0xa163666f6f3a00000000".toByteArray() @@ -2647,6 +2814,7 @@ class CborDeserializerSuccessTest { assertEquals(-1, actual.entries.first().value) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun `indefinite map of negint - 2 - min`() { val payload = "0xbf63666f6f390000ff".toByteArray() diff --git a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerTest.kt b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerTest.kt index a94891c5cb..93a5b10806 100644 --- a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerTest.kt +++ b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborDeserializerTest.kt @@ -4,12 +4,14 @@ */ package aws.smithy.kotlin.runtime.serde.cbor +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.io.SdkBuffer import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertFails class CborDeserializerTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNumberDeserializationThrowsOnOutOfRange() { val serializer = CborSerializer() diff --git a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborSerializerTest.kt b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborSerializerTest.kt index 918fe764ba..b8c45af823 100644 --- a/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborSerializerTest.kt +++ b/runtime/serde/serde-cbor/common/test/aws/smithy/kotlin/runtime/serde/cbor/CborSerializerTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.serde.cbor +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.BigDecimal import aws.smithy.kotlin.runtime.content.BigInteger import aws.smithy.kotlin.runtime.io.SdkBuffer @@ -17,6 +18,7 @@ import kotlin.time.Duration.Companion.seconds @OptIn(ExperimentalStdlibApi::class) class CborSerializerTest { + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBoolean() { val tests = listOf(true, false, true, false, false) @@ -35,6 +37,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testByte() { val tests = listOf(Byte.MIN_VALUE, -34, 0, 39, Byte.MAX_VALUE) @@ -52,6 +55,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testChar() { val tests = listOf( @@ -76,6 +80,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInt() { val tests = listOf(Int.MIN_VALUE, -34, 0, 39, 402, Int.MAX_VALUE) @@ -93,6 +98,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testLong() { val tests = listOf(Long.MIN_VALUE, -34, 0, 39, 402, Long.MAX_VALUE) @@ -110,6 +116,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testFloat() { val tests = listOf( @@ -141,6 +148,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDouble() { val tests = listOf( @@ -168,6 +176,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBigInteger() { val tests = listOf( @@ -199,6 +208,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testBigDecimal() { val tests = listOf( @@ -238,6 +248,7 @@ class CborSerializerTest { assertEquals("c48221196ab3", serializer.toByteArray().toHexString()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testString() { val tests = listOf( @@ -264,6 +275,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testInstant() { val tests = listOf( @@ -299,6 +311,7 @@ class CborSerializerTest { assertEquals(0, buffer.size) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testNull() { val serializer = CborSerializer() @@ -310,6 +323,7 @@ class CborSerializerTest { assertNull(deserializer.deserializeNull()) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testDocument() { val serializer = CborSerializer() @@ -318,6 +332,7 @@ class CborSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testList() { val serializer = CborSerializer() @@ -354,6 +369,7 @@ class CborSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun testMap() { val serializer = CborSerializer() diff --git a/runtime/serde/serde-form-url/common/test/aws/smithy/kotlin/runtime/serde/formurl/FormUrlSerializerTest.kt b/runtime/serde/serde-form-url/common/test/aws/smithy/kotlin/runtime/serde/formurl/FormUrlSerializerTest.kt index ea5662dba7..9874dbafa4 100644 --- a/runtime/serde/serde-form-url/common/test/aws/smithy/kotlin/runtime/serde/formurl/FormUrlSerializerTest.kt +++ b/runtime/serde/serde-form-url/common/test/aws/smithy/kotlin/runtime/serde/formurl/FormUrlSerializerTest.kt @@ -5,6 +5,7 @@ package aws.smithy.kotlin.runtime.serde.formurl +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.serde.* import aws.smithy.kotlin.runtime.time.Instant import aws.smithy.kotlin.runtime.time.TimestampFormat @@ -99,6 +100,7 @@ class FormUrlSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesStructs() { val struct = PrimitiveStructTest() @@ -123,6 +125,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesEmptyStrings() { // see `string` from https://awslabs.github.io/smithy/1.0/spec/aws/aws-query-protocol.html#x-www-form-urlencoded-shape-serialization @@ -185,6 +188,7 @@ class FormUrlSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesLists() { val input = ListInput( @@ -206,6 +210,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesFlattenedLists() { // xmlFlattened() lists @@ -230,6 +235,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesListsWithRenamedMember() { // xmlName() trait on list member @@ -251,6 +257,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesClassWithNestedClassField() { val a = A( @@ -310,6 +317,7 @@ class FormUrlSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesMaps() { val input = MapInput( @@ -343,6 +351,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itSerializesMapOfLists() { val input = MapInput( @@ -391,6 +400,7 @@ class FormUrlSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesMapOfMapOfPrimitive() { val expected = """ @@ -412,6 +422,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesFlattenedMaps() { val input = MapInput( @@ -480,6 +491,7 @@ class FormUrlSerializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesNestedMaps() { val input = NestedStructureInput( @@ -499,6 +511,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesNestedLists() { val input = NestedStructureInput( @@ -516,6 +529,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesRenamedMaps() { // map with xmlName key/value overrides @@ -553,6 +567,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesQueryLiterals() { // test SdkObjectDescriptor with query literals trait @@ -584,6 +599,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itEncodesWhitespace() { val input = MapInput( @@ -608,6 +624,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesEmptyList() { val input = ListInput( @@ -625,6 +642,7 @@ class FormUrlSerializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itSerializesEmptyListInMap() { val input = MapInput( diff --git a/runtime/serde/serde-json/common/test/aws/smithy/kotlin/runtime/serde/json/JsonDeserializerTest.kt b/runtime/serde/serde-json/common/test/aws/smithy/kotlin/runtime/serde/json/JsonDeserializerTest.kt index bd96e92173..fd12b97a95 100644 --- a/runtime/serde/serde-json/common/test/aws/smithy/kotlin/runtime/serde/json/JsonDeserializerTest.kt +++ b/runtime/serde/serde-json/common/test/aws/smithy/kotlin/runtime/serde/json/JsonDeserializerTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.serde.json +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.content.Document import aws.smithy.kotlin.runtime.content.buildDocument import aws.smithy.kotlin.runtime.serde.* @@ -99,6 +100,7 @@ class JsonDeserializerTest { assertEquals(expected, actual) } + @IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation @Test fun itHandlesBigInteger() { val tests = listOf( @@ -116,6 +118,7 @@ class JsonDeserializerTest { } } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itHandlesBigDecimal() { val tests = listOf( diff --git a/runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlSerializer.kt b/runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlSerializer.kt index 35618cb49e..d1356f848c 100644 --- a/runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlSerializer.kt +++ b/runtime/serde/serde-xml/common/src/aws/smithy/kotlin/runtime/serde/xml/XmlSerializer.kt @@ -134,7 +134,7 @@ public class XmlSerializer(private val xmlWriter: XmlStreamWriter = xmlStreamWri field(descriptor, value.format(format)) override fun field(descriptor: SdkFieldDescriptor, value: ByteArray): Unit = - field(descriptor, value) + field(descriptor, value.encodeBase64String()) override fun field(descriptor: SdkFieldDescriptor, value: Document?): Unit = throw SerializationException( "cannot serialize field ${descriptor.serialName}; Document type is not supported by xml encoding", diff --git a/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpRequestTestBuilderTest.kt b/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpRequestTestBuilderTest.kt index 140fea8d25..6798ed3d0b 100644 --- a/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpRequestTestBuilderTest.kt +++ b/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpRequestTestBuilderTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.smithy.test +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.request.HttpRequest @@ -19,6 +20,7 @@ class HttpRequestTestBuilderTest { private val execContext = ExecutionContext() + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsHttpMethod() { val ex = assertFails { @@ -37,6 +39,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("expected method: `POST`; got: `GET`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsUri() { val ex = assertFails { @@ -57,6 +60,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("expected path: `/foo`; got: `/bar`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsQueryParameters() { val ex = assertFails { @@ -85,6 +89,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("Query parameter `Hi` does not contain expected value `Hello%20there`. Actual values: [Hello]") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsForbiddenQueryParameters() { val ex = assertFails { @@ -115,6 +120,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("forbidden query parameter found: `foobar`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsRequiredQueryParameters() { val ex = assertFails { @@ -146,6 +152,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("required query parameter not found: `requiredQuery`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsHeaders() { val ex = assertFails { @@ -186,6 +193,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("expected header `k2` has no actual values") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsListsOfHeaders() { val ex = assertFails { @@ -214,6 +222,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("expected header name value pair not equal: `k2:v3, v4, v5`; found: `k2:v3, v4") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsForbiddenHeaders() { val ex = assertFails { @@ -257,6 +266,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("forbidden header found: `forbiddenHeader`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsRequiredHeaders() { val ex = assertFails { @@ -301,6 +311,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("expected required header not found: `requiredHeader`") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itFailsWhenBodyAssertFunctionIsMissing() { val ex = assertFails { @@ -320,6 +331,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("body assertion function is required if an expected body is defined") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itCallsBodyAssertFunction() { val ex = assertFails { @@ -340,6 +352,7 @@ class HttpRequestTestBuilderTest { ex.message.shouldContain("actual bytes read does not match expected") } + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itAssertsHostWhenSet() { val ex = assertFails { diff --git a/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpResponseTestBuilderTest.kt b/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpResponseTestBuilderTest.kt index 5a66bd33be..8571acdb17 100644 --- a/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpResponseTestBuilderTest.kt +++ b/runtime/smithy-test/common/test/aws/smithy/kotlin/runtime/smithy/test/HttpResponseTestBuilderTest.kt @@ -4,6 +4,7 @@ */ package aws.smithy.kotlin.runtime.smithy.test +import aws.smithy.kotlin.runtime.IgnoreNative import aws.smithy.kotlin.runtime.http.HttpStatusCode import aws.smithy.kotlin.runtime.http.readAll import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder @@ -14,6 +15,7 @@ import kotlin.test.Test class HttpResponseTestBuilderTest { private data class Foo(val bar: Int, val baz: String) + @IgnoreNative // FIXME Re-enable after Kotlin/Native implementation @Test fun itBuildsResponses() { httpResponseTest {