Skip to content

Commit 59ea1ff

Browse files
committed
Add zero-arg constructor, apply @IgnoreNative everywhere!
1 parent 7f27659 commit 59ea1ff

File tree

54 files changed

+541
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+541
-497
lines changed

runtime/auth/aws-credentials/common/test/aws/smithy/kotlin/runtime/auth/awscredentials/CachedCredentialsProviderTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CachedCredentialsProviderTest {
6666
assertEquals(1, source.callCount)
6767
}
6868

69-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
69+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
7070
@Test
7171
fun testReloadExpiredCredentials() = runTest {
7272
val source = TestCredentialsProvider(expiration = testExpiration)
@@ -82,7 +82,7 @@ class CachedCredentialsProviderTest {
8282
assertEquals(2, source.callCount)
8383
}
8484

85-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
85+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
8686
@Test
8787
fun testRefreshBufferWindow() = runTest {
8888
val source = TestCredentialsProvider(expiration = testExpiration)
@@ -104,7 +104,7 @@ class CachedCredentialsProviderTest {
104104
assertEquals(2, source.callCount)
105105
}
106106

107-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
107+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
108108
@Test
109109
fun testLoadFailed() = runTest {
110110
val source = object : CredentialsProvider {
@@ -127,7 +127,7 @@ class CachedCredentialsProviderTest {
127127
provider.resolve()
128128
}
129129

130-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
130+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
131131
@Test
132132
fun testItThrowsOnGetCredentialsAfterClose() = runTest {
133133
val source = TestCredentialsProvider(expiration = testExpiration)
@@ -145,7 +145,7 @@ class CachedCredentialsProviderTest {
145145
assertEquals(1, source.callCount)
146146
}
147147

148-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
148+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
149149
@Test
150150
fun testCachedConvenienceFunction() = runTest {
151151
val source = TestCredentialsProvider(expiration = testExpiration)

runtime/auth/aws-signing-tests/common/src/aws/smithy/kotlin/runtime/auth/awssigning/tests/AwsChunkedTestBase.kt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package aws.smithy.kotlin.runtime.auth.awssigning.tests
77

8+
import aws.smithy.kotlin.runtime.IgnoreNative
89
import aws.smithy.kotlin.runtime.auth.awssigning.*
910
import aws.smithy.kotlin.runtime.auth.awssigning.internal.CHUNK_SIZE_BYTES
1011
import aws.smithy.kotlin.runtime.http.DeferredHeaders
@@ -171,7 +172,7 @@ abstract class AwsChunkedTestBase(
171172
return length
172173
}
173174

174-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
175+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
175176
@Test
176177
fun testReadNegativeOffset(): TestResult = runTest {
177178
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -185,7 +186,7 @@ abstract class AwsChunkedTestBase(
185186
}
186187
}
187188

188-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
189+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
189190
@Test
190191
fun testReadExactBytes(): TestResult = runTest {
191192
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -219,7 +220,7 @@ abstract class AwsChunkedTestBase(
219220
assertTrue(awsChunked.isClosedForRead())
220221
}
221222

222-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
223+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
223224
@Test
224225
fun testReadExcessiveBytes(): TestResult = runTest {
225226
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -249,7 +250,7 @@ abstract class AwsChunkedTestBase(
249250
assertTrue(awsChunked.isClosedForRead())
250251
}
251252

252-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
253+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
253254
@Test
254255
fun testReadFewerBytes(): TestResult = runTest {
255256
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -276,7 +277,7 @@ abstract class AwsChunkedTestBase(
276277
assertFalse(awsChunked.isClosedForRead())
277278
}
278279

279-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
280+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
280281
@Test
281282
fun testReadMultipleFullChunks(): TestResult = runTest {
282283
val numChunks = 5
@@ -324,7 +325,7 @@ abstract class AwsChunkedTestBase(
324325
assertTrue(awsChunked.isClosedForRead())
325326
}
326327

327-
@Ignore // FIXME Re-enable after Kotlin/Native Implementation
328+
@IgnoreNative // FIXME Re-enable after Kotlin/Native Implementation
328329
@Test
329330
fun testReadMultipleChunksLastChunkNotFull(): TestResult = runTest {
330331
val numChunks = 6
@@ -390,7 +391,7 @@ abstract class AwsChunkedTestBase(
390391
assertEquals(0, chunkSizes.last())
391392
}
392393

393-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
394+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
394395
@Test
395396
fun testReadWithTrailingHeaders(): TestResult = runTest {
396397
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -441,7 +442,7 @@ abstract class AwsChunkedTestBase(
441442
assertEquals(expectedTrailerSignature.decodeToString(), trailerSignature)
442443
}
443444

444-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
445+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
445446
@Test
446447
fun testUnsignedChunk(): TestResult = runTest {
447448
val dataLengthBytes = CHUNK_SIZE_BYTES
@@ -473,7 +474,7 @@ abstract class AwsChunkedTestBase(
473474
assertEquals(chunkSizes[1], 0)
474475
}
475476

476-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
477+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
477478
@Test
478479
fun testUnsignedChunkWithTrailingHeaders(): TestResult = runTest {
479480
val dataLengthBytes = CHUNK_SIZE_BYTES

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public abstract class AwsHttpSignerTestBase(
163163
assertEquals(expectedSig, signed.headers["Authorization"])
164164
}
165165

166-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
166+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
167167
@Test
168168
public fun testSignAwsChunkedStreamReplayable(): TestResult = runTest {
169169
val op = buildOperation(streaming = true, replayable = true, requestBody = "a".repeat(AWS_CHUNKED_THRESHOLD + 1))
@@ -177,7 +177,7 @@ public abstract class AwsHttpSignerTestBase(
177177
assertEquals(expectedSig, signed.headers["Authorization"])
178178
}
179179

180-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
180+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
181181
@Test
182182
public fun testSignOneShotStream(): TestResult = runTest {
183183
val op = buildOperation(streaming = true, replayable = false)

runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/ReadChannelBodyStreamTest.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package aws.smithy.kotlin.runtime.crt
77

88
import aws.sdk.kotlin.crt.io.MutableBuffer
9+
import aws.smithy.kotlin.runtime.IgnoreNative
910
import aws.smithy.kotlin.runtime.io.SdkBuffer
1011
import aws.smithy.kotlin.runtime.io.SdkByteChannel
1112
import aws.smithy.kotlin.runtime.io.SdkByteReadChannel
@@ -27,7 +28,7 @@ class ReadChannelBodyStreamTest {
2728
return MutableBuffer.of(dest) to dest
2829
}
2930

30-
@Ignore // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
31+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
3132
@Test
3233
fun testClose() = runTest {
3334
val chan = SdkByteChannel()
@@ -44,7 +45,7 @@ class ReadChannelBodyStreamTest {
4445
assertTrue(stream.sendRequestBody(sendBuffer))
4546
}
4647

47-
@Ignore // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
48+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
4849
@Test
4950
fun testCancellation() = runTest {
5051
val chan = SdkByteChannel()
@@ -59,7 +60,7 @@ class ReadChannelBodyStreamTest {
5960
}
6061
}
6162

62-
@Ignore // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1
63+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1
6364
@Test
6465
fun testReadFully() = runTest {
6566
val data = byteArrayOf(1, 2, 3, 4, 5)
@@ -75,7 +76,7 @@ class ReadChannelBodyStreamTest {
7576
}
7677
}
7778

78-
@Ignore // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1
79+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.NotImplementedError at null:-1
7980
@Test
8081
fun testPartialRead() = runTest {
8182
val chan = SdkByteReadChannel("123456".encodeToByteArray())
@@ -94,7 +95,7 @@ class ReadChannelBodyStreamTest {
9495
assertEquals("456", sent2.decodeToString())
9596
}
9697

97-
@Ignore // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
98+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation. kotlin.native.internal.FileFailedToInitializeException at null:-1
9899
@Test
99100
fun testLargeTransfer() = runTest {
100101
val chan = SdkByteChannel()

runtime/crt-util/jvmAndNative/test/aws/smithy/kotlin/runtime/crt/SdkSourceBodyStreamTest.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
package aws.smithy.kotlin.runtime.crt
77

88
import aws.sdk.kotlin.crt.io.MutableBuffer
9+
import aws.smithy.kotlin.runtime.IgnoreNative
910
import aws.smithy.kotlin.runtime.io.SdkBuffer
1011
import aws.smithy.kotlin.runtime.io.SdkSource
1112
import aws.smithy.kotlin.runtime.io.source
@@ -22,7 +23,7 @@ class SdkSourceBodyStreamTest {
2223
return MutableBuffer.of(dest) to dest
2324
}
2425

25-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
26+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
2627
@Test
2728
fun testReadFully() = runTest {
2829
val data = byteArrayOf(1, 2, 3, 4, 5)
@@ -37,7 +38,7 @@ class SdkSourceBodyStreamTest {
3738
}
3839
}
3940

40-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
41+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
4142
@Test
4243
fun testPartialRead() = runTest {
4344
val source = "123456".encodeToByteArray().source()
@@ -55,7 +56,7 @@ class SdkSourceBodyStreamTest {
5556
assertEquals("456", sent2.decodeToString())
5657
}
5758

58-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
59+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
5960
@Test
6061
fun testLargeTransfer() = runTest {
6162
val data = "foobar"

runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/EventStreamSigningTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package aws.smithy.kotlin.runtime.awsprotocol.eventstream
77

8+
import aws.smithy.kotlin.runtime.IgnoreNative
89
import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials
910
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
1011
import aws.smithy.kotlin.runtime.auth.awssigning.*
@@ -29,7 +30,7 @@ class EventStreamSigningTest {
2930
override suspend fun resolve(attributes: Attributes) = testCredentials
3031
}
3132

32-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
33+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
3334
@Test
3435
fun testSignPayload() = runTest {
3536
val messageToSign = buildMessage {
@@ -68,7 +69,7 @@ class EventStreamSigningTest {
6869
assertEquals(expected, actualSignature)
6970
}
7071

71-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
72+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
7273
@Test
7374
fun testEmptyEndFrameSent() = runTest {
7475
val messageToSign = buildMessage {

runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameDecoderTest.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package aws.smithy.kotlin.runtime.awsprotocol.eventstream
77

8+
import aws.smithy.kotlin.runtime.IgnoreNative
89
import aws.smithy.kotlin.runtime.io.*
910
import io.kotest.matchers.string.shouldContain
1011
import kotlinx.coroutines.flow.*
@@ -15,7 +16,7 @@ import kotlin.test.assertEquals
1516
import kotlin.test.assertFailsWith
1617

1718
class FrameDecoderTest {
18-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
19+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
1920
@Test
2021
fun testFrameStreamSingleMessage() = runTest {
2122
val encoded = validMessageWithAllHeaders()
@@ -29,7 +30,7 @@ class FrameDecoderTest {
2930
assertEquals(expected, actual.first())
3031
}
3132

32-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
33+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
3334
@Test
3435
fun testFrameStreamMultipleMessagesChunked() = runTest {
3536
val encoded = SdkBuffer().apply {
@@ -53,7 +54,7 @@ class FrameDecoderTest {
5354
assertEquals(expected3, actual[2])
5455
}
5556

56-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
57+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
5758
@Test
5859
fun testChannelClosed() = runTest {
5960
// contents don't matter

runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/FrameEncoderTest.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package aws.smithy.kotlin.runtime.awsprotocol.eventstream
77

8+
import aws.smithy.kotlin.runtime.IgnoreNative
89
import aws.smithy.kotlin.runtime.http.readAll
910
import aws.smithy.kotlin.runtime.io.SdkBuffer
1011
import kotlinx.coroutines.flow.flowOf
@@ -17,7 +18,7 @@ import kotlin.test.assertContentEquals
1718
import kotlin.test.assertEquals
1819

1920
class FrameEncoderTest {
20-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
21+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
2122
@Test
2223
fun testEncode() = runTest {
2324
val expected = listOf(
@@ -44,7 +45,7 @@ class FrameEncoderTest {
4445
assertContentEquals(expected[2], actual[2].readByteArray())
4546
}
4647

47-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
48+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
4849
@Test
4950
fun testAsEventStreamHttpBody() = runTest {
5051
val messages = flowOf(

runtime/protocol/aws-event-stream/common/test/aws/smithy/kotlin/runtime/awsprotocol/eventstream/HeaderValueTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package aws.smithy.kotlin.runtime.awsprotocol.eventstream
77

8+
import aws.smithy.kotlin.runtime.IgnoreNative
89
import aws.smithy.kotlin.runtime.time.Instant
910
import aws.smithy.kotlin.runtime.util.Uuid
1011
import io.kotest.matchers.string.shouldContain
@@ -16,7 +17,7 @@ import kotlin.test.assertFails
1617

1718
class HeaderValueTest {
1819

19-
@Ignore // FIXME Re-enable after Kotlin/Native implementation
20+
@IgnoreNative // FIXME Re-enable after Kotlin/Native implementation
2021
@Test
2122
fun testExpectAs() {
2223
assertEquals(true, HeaderValue.Bool(true).expectBool())

0 commit comments

Comments
 (0)