Skip to content
This repository has been archived by the owner on Jun 22, 2024. It is now read-only.

Re-add ignored Test #8

Open
sya-ri opened this issue Aug 13, 2022 · 1 comment
Open

Re-add ignored Test #8

sya-ri opened this issue Aug 13, 2022 · 1 comment

Comments

@sya-ri
Copy link
Owner

sya-ri commented Aug 13, 2022

@Ignore // TODO native: ArrayIndexOutOfBoundsException will be thrown, why?
@Test
fun getContent_should_be_successful() {
runTest {
val mockEngine = MockEngine {
respond(
content = """
{
"status": "ok",
"data": {
"isOwner": true,
"id": "3dbc2f87-4c1e-4a81-badc-af004e61a5b4",
"type": "folder",
"name": "Z19n9a",
"parentFolder": "3241d27a-f7e1-4158-bc75-73d057eff5fa",
"code": "Z19n9a",
"createTime": 1648229689,
"public": true,
"childs": [],
"totalDownloadCount": 0,
"totalSize": 9840497,
"contents": {}
}
}
""".trimIndent().let(::ByteReadChannel),
status = HttpStatusCode.OK,
headers = headersOf(HttpHeaders.ContentType, "application/json")
)
}
assertNotNull(GofileClient(mockEngine).getContent("3dbc2f87-4c1e-4a81-badc-af004e61a5b4", "ivlW1ZSGn2Y4AoADbCHUjllj2cO9m3WM").getOrThrow())
}
}

@sya-ri
Copy link
Owner Author

sya-ri commented Sep 7, 2022

Error

kotlin.ArrayIndexOutOfBoundsException
	at kotlin.Throwable#<init>(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:28)
	at kotlin.Exception#<init>(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:21)
	at kotlin.RuntimeException#<init>(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:32)
	at kotlin.IndexOutOfBoundsException#<init>(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:90)
	at kotlin.ArrayIndexOutOfBoundsException#<init>(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:97)
	at <global>.ThrowArrayIndexOutOfBoundsException(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/RuntimeUtils.kt:25)
	at <global>.Kotlin_Array_get(Unknown Source)
	at dev.s7a.gofile.GofileResponse.Companion#serializer(/Users/epq/project/Private/gofile-kt/src/commonMain/kotlin/dev/s7a/gofile/GofileResponse.kt:1)
	at kotlinx.serialization.internal#constructSerializerForGivenTypeArgs__at__kotlin.reflect.KClass<0:0>(/opt/buildAgent/work/b2fef8360e1bcf3d/core/nativeMain/src/kotlinx/serialization/internal/Platform.kt:36)
	at kotlinx.serialization.internal#compiledSerializerImpl__at__kotlin.reflect.KClass<0:0>(/opt/buildAgent/work/b2fef8360e1bcf3d/core/nativeMain/src/kotlinx/serialization/internal/Platform.kt:46)
	at kotlinx.serialization#serializerOrNull__at__kotlin.reflect.KClass<0:0>(/opt/buildAgent/work/b2fef8360e1bcf3d/core/commonMain/src/kotlinx/serialization/Serializers.kt:177)
	at kotlinx.serialization#serializer__at__kotlin.reflect.KClass<0:0>(/opt/buildAgent/work/b2fef8360e1bcf3d/core/commonMain/src/kotlinx/serialization/Serializers.kt:154)
	at io.ktor.serialization.kotlinx#serializerFromTypeInfo(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/ktor-serialization-kotlinx/common/src/io/ktor/serialization/kotlinx/SerializerLookup.kt:24)
	at io.ktor.serialization.kotlinx.KotlinxSerializationConverter.$deserializeCOROUTINE$1#invokeSuspend(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/ktor-serialization-kotlinx/common/src/io/ktor/serialization/kotlinx/KotlinxSerializationConverter.kt:66)
	at io.ktor.serialization.kotlinx.KotlinxSerializationConverter#deserialize(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/ktor-serialization-kotlinx/common/src/io/ktor/serialization/kotlinx/KotlinxSerializationConverter.kt:65)
	at io.ktor.serialization.object-1.$collect$lambda-0COROUTINE$3.invokeSuspend#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:44)
	at io.ktor.serialization.object-1.collect$lambda-0#internal(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/operators/Emitters.kt:51)
	at io.ktor.serialization.object-1.$collect$lambda-0$FUNCTION_REFERENCE$1.emit#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:44)
	at kotlinx.coroutines.flow.object-3.$collectCOROUTINE$56.invokeSuspend#internal(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/Builders.kt:155)
	at kotlinx.coroutines.flow.object-3.collect#internal(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/Builders.kt:155)
	at io.ktor.serialization.object-1.$collectCOROUTINE$2.invokeSuspend#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:92)
	at io.ktor.serialization.object-1.collect#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:92)
	at kotlinx.coroutines.flow.$firstOrNullCOROUTINE$213#invokeSuspend(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt:136)
	at kotlinx.coroutines.flow#firstOrNull__at__kotlinx.coroutines.flow.Flow<0:0>(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/flow/terminal/Reduce.kt:135)
	at io.ktor.serialization.$deserializeCOROUTINE$0#invokeSuspend(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:128)
	at io.ktor.serialization#deserialize__at__kotlin.collections.List<io.ktor.serialization.ContentConverter>(/opt/buildAgent/work/8d547b974a7be21f/ktor-shared/ktor-serialization/common/src/ContentConverter.kt:112)
	at io.ktor.client.plugins.contentnegotiation.ContentNegotiation#convertResponse(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-plugins/ktor-client-content-negotiation/common/src/io/ktor/client/plugins/contentnegotiation/ContentNegotiation.kt:185)
	at io.ktor.client.plugins.contentnegotiation.ContentNegotiation.Plugin.$install$lambda-1COROUTINE$1.invokeSuspend#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-plugins/ktor-client-content-negotiation/common/src/io/ktor/client/plugins/contentnegotiation/ContentNegotiation.kt:210)
	at io.ktor.client.plugins.contentnegotiation.ContentNegotiation.Plugin.$install$lambda-1COROUTINE$1.invoke#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-plugins/ktor-client-content-negotiation/common/src/io/ktor/client/plugins/contentnegotiation/ContentNegotiation.kt:206)
	at io.ktor.client.plugins.contentnegotiation.ContentNegotiation.Plugin.$install$lambda-1COROUTINE$1.invoke#internal.4(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-plugins/ktor-client-content-negotiation/common/src/io/ktor/client/plugins/contentnegotiation/ContentNegotiation.kt:1)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:123)
	at io.ktor.util.pipeline.SuspendFunctionGun#proceed(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:81)
	at io.ktor.client.HttpClient.$<init>$lambda-3COROUTINE$2.invokeSuspend#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/HttpClient.kt:173)
	at io.ktor.client.HttpClient.$<init>$lambda-3COROUTINE$2.invoke#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/HttpClient.kt:171)
	at io.ktor.client.HttpClient.$<init>$lambda-3COROUTINE$2.invoke#internal.4(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/HttpClient.kt:1)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:123)
	at io.ktor.util.pipeline.SuspendFunctionGun#proceed(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:81)
	at io.ktor.util.pipeline.SuspendFunctionGun#proceedWith(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:91)
	at io.ktor.client.plugins.HttpCallValidator.Companion.$install$lambda-2COROUTINE$23.invokeSuspend#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/HttpCallValidator.kt:138)
	at io.ktor.client.plugins.HttpCallValidator.Companion.$install$lambda-2COROUTINE$23.invoke#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/HttpCallValidator.kt:136)
	at io.ktor.client.plugins.HttpCallValidator.Companion.$install$lambda-2COROUTINE$23.invoke#internal.32(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/plugins/HttpCallValidator.kt:1)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:123)
	at io.ktor.util.pipeline.SuspendFunctionGun#proceed(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:81)
	at io.ktor.util.pipeline.SuspendFunctionGun#execute(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:101)
	at io.ktor.util.pipeline.Pipeline#execute(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/Pipeline.kt:77)
	at io.ktor.client.call.HttpClientCall.$bodyNullableCOROUTINE$6#invokeSuspend(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt:87)
	at io.ktor.client.call.HttpClientCall#bodyNullable(/opt/buildAgent/work/8d547b974a7be21f/ktor-client/ktor-client-core/common/src/io/ktor/client/call/HttpClientCall.kt:77)
	at dev.s7a.gofile.GofileClient.$getContentCOROUTINE$35#invokeSuspend(/Users/epq/project/Private/gofile-kt/src/commonMain/kotlin/dev/s7a/gofile/GofileClient.kt:107)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:30)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.object-1.resumeWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:62)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.object-1.resumeWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:62)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.object-1.resumeWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:62)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43)
	at io.ktor.util.pipeline.SuspendFunctionGun.resumeRootWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:138)
	at io.ktor.util.pipeline.SuspendFunctionGun.loop#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:112)
	at io.ktor.util.pipeline.SuspendFunctionGun.object-1.resumeWith#internal(/opt/buildAgent/work/8d547b974a7be21f/ktor-utils/common/src/io/ktor/util/pipeline/SuspendFunctionGun.kt:62)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:43)
	at kotlinx.coroutines.DispatchedTask#run(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:106)
	at kotlinx.coroutines.test.TestDispatcher#processEvent(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestDispatcher.kt:28)
	at kotlinx.coroutines.test.TestCoroutineScheduler#tryRunNextTaskUnless(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt:100)
	at kotlinx.coroutines.test.$runTestCoroutine$lambda-5COROUTINE$3.invokeSuspend#internal(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestBuilders.kt:247)
	at kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/coroutines/ContinuationImpl.kt:30)
	at kotlinx.coroutines.DispatchedTask#run(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/internal/DispatchedTask.kt:106)
	at kotlinx.coroutines.EventLoopImplBase#processNextEvent(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/common/src/EventLoop.common.kt:284)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking#internal(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/Builders.kt:83)
	at kotlinx.coroutines#runBlocking(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/Builders.kt:56)
	at kotlinx.coroutines#runBlocking$default(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-core/native/src/Builders.kt:36)
	at kotlinx.coroutines.test#createTestResult(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/native/src/TestBuilders.kt:12)
	at kotlinx.coroutines.test#runTest__at__kotlinx.coroutines.test.TestScope(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestBuilders.kt:166)
	at kotlinx.coroutines.test#runTest(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestBuilders.kt:154)
	at kotlinx.coroutines.test#runTest$default(/opt/buildAgent/work/44ec6e850d5c63f0/kotlinx-coroutines-test/common/src/TestBuilders.kt:147)
	at <global>.Tests#getContent_should_be_successful(/Users/epq/project/Private/gofile-kt/src/commonTest/kotlin/Tests.kt:111)
	at $Tests$test$0.$getContent_should_be_successful$FUNCTION_REFERENCE$29.invoke#internal(/Users/epq/project/Private/gofile-kt/src/commonTest/kotlin/Tests.kt:110)
	at $Tests$test$0.$getContent_should_be_successful$FUNCTION_REFERENCE$29.$<bridge-UNNN>invoke(/Users/epq/project/Private/gofile-kt/src/commonTest/kotlin/Tests.kt:110)
	at kotlin.native.internal.test.BaseClassSuite.TestCase#run(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:85)
	at kotlin.native.internal.test.TestRunner.run#internal(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:245)
	at kotlin.native.internal.test.TestRunner.runIteration#internal(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:271)
	at kotlin.native.internal.test.TestRunner#run(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:286)
	at kotlin.native.internal.test#testLauncherEntryPoint(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:30)
	at kotlin.native.internal.test#main(/opt/buildAgent/work/67fbc2b507315583/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:34)
	at <global>.Konan_start(/Users/epq/.gradle/daemon/7.5.1/entryPointOwner:1)
	at <global>.Init_and_run_start(Unknown Source)
	at <global>.0x0(Unknown Source)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant