You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 22, 2022. It is now read-only.
Create a project and apply gradle configuration as specified in "examples" found on the interweb
Write Unit test in iosTest source set
class DataProviderTests {
@Test
fun `Test basic open on ios`() {
DB.inDir(NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, true)[0] as String)
.open("myinstance", TypeTable {
root<MyTestEntity>()
}, KotlinxSerializer())
}
}
@Serializable
class MyTestEntity(override val id: String, val name: String) : Metadata
Run unit tests via gradle
./gradlew check
Expected results
The database should be created as it is specified in the documentation
Actual result: Exception is thrown:
org.kodein.db.leveldb.LevelDBException: NotFound: /Users/tosborn/Library/Developer/CoreSimulator/Devices/6DF6DEF7-08AF-4D96-8F75-3213776E5A88/data/Documents/myinstance/LOCK: No such file or directory
org.kodein.db.leveldb.LevelDBException: NotFound: /Users/tosborn/Library/Developer/CoreSimulator/Devices/6DF6DEF7-08AF-4D96-8F75-3213776E5A88/data/Documents/myinstance/LOCK: No such file or directory
at kotlin.Throwable#<init>(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/Throwable.kt:23)
at kotlin.Exception#<init>(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/Exceptions.kt:23)
at org.kodein.db.leveldb.LevelDBException#<init>(/Users/runner/work/Kodein-DB/Kodein-DB/ldb/kodein-leveldb-api/src/commonMain/kotlin/org/kodein/db/leveldb/LevelDBException.kt:6)
at org.kodein.db.leveldb.native.LevelDBNative.Factory#open(/Users/runner/work/Kodein-DB/Kodein-DB/ldb/kodein-leveldb/src/allNativeMain/kotlin/org/kodein/db/leveldb/native/LevelDBNative.kt:111)
at org.kodein.db.impl.kv.AbstractKeyValueDBFactory#open(/Users/runner/work/Kodein-DB/Kodein-DB/kdb/kodein-db/src/commonMain/kotlin/org/kodein/db/impl/kv/AbstractKeyValueDBFactory.kt:20)
at org.kodein.db.impl.data.AbstractDataDBFactory#open(/Users/runner/work/Kodein-DB/Kodein-DB/kdb/kodein-db/src/commonMain/kotlin/org/kodein/db/impl/data/AbstractDataDBFactory.kt:20)
at org.kodein.db.impl.model.AbstractModelDBFactory#open(/Users/runner/work/Kodein-DB/Kodein-DB/kdb/kodein-db/src/commonMain/kotlin/org/kodein/db/impl/model/AbstractModelDBFactory.kt:29)
at org.kodein.db.impl.AbstractDBFactory#open(/Users/runner/work/Kodein-DB/Kodein-DB/kdb/kodein-db/src/commonMain/kotlin/org/kodein/db/impl/AbstractDBFactory.kt:25)
at org.kodein.db.DBFactory.Based#open(/Users/runner/work/Kodein-DB/Kodein-DB/kdb/kodein-db-api/src/commonMain/kotlin/org/kodein/db/DBFactory.kt:8)
at com.insulet.cordibus.platform.common.DataProviderTests#Test(/Users/tosborn/InsuletWorkspace/platform-core/platform-core/src/iosTest/kotlin/com/insulet/cordibus/platform/common/DataProviderTest.kt:18)
at com.insulet.cordibus.platform.common.$DataProviderTests$test$0.$Test(/Users/tosborn/InsuletWorkspace/platform-core/platform-core/src/iosTest/kotlin/com/insulet/cordibus/platform/common/DataProviderTest.kt:17)
at com.insulet.cordibus.platform.common.$DataProviderTests$test$0.$Test(/Users/tosborn/InsuletWorkspace/platform-core/platform-core/src/iosTest/kotlin/com/insulet/cordibus/platform/common/DataProviderTest.kt:17)
at kotlin.native.internal.test.BaseClassSuite.TestCase#run(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:85)
at kotlin.native.internal.test.TestRunner.run#internal(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:245)
at kotlin.native.internal.test.TestRunner.runIteration#internal(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:271)
at kotlin.native.internal.test.TestRunner#run(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:286)
at kotlin.native.internal.test#testLauncherEntryPoint(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:22)
at kotlin.native.internal.test#main(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:26)
at <global>.Konan_start(/Users/teamcity3/buildAgent/work/290aee0e088a1666/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:25)
at <global>.Init_and_run_start(Unknown Source)
at <global>.start(Unknown Source)
at <global>.0x0(Unknown Source)
The text was updated successfully, but these errors were encountered:
Does this happen at all tests?
This error may happen if you try to open a database that you did not close properly, so is it possible that your first test runs, and that your second test fails with this?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Steps to reproduce:
Expected results
The database should be created as it is specified in the documentation
![image](https://user-images.githubusercontent.com/60557131/126418774-970f44b3-49c4-419b-b760-8dac10611828.png)
Actual result: Exception is thrown:
The text was updated successfully, but these errors were encountered: