actual implementation of testDbConnection() for Android (TestUtilAndroid) checks if we are in instrumented test but in reality we never run instrumented test, and AndroidSqliteDriver is never used.
internal actual fun testDbConnection(): SqlDriver {
// Try to use the android driver (which only works if we're on robolectric).
// Fall back to jdbc if that fails.
return try {
val app = ApplicationProvider.getApplicationContext<Application>()
AndroidSqliteDriver(KaMPKitDb.Schema, app, "kampkitdb")
} catch (exception: IllegalStateException) {
JdbcSqliteDriver(JdbcSqliteDriver.IN_MEMORY)
.also { KaMPKitDb.Schema.create(it) }
}
}
This is a relic of when we had Robolectric running some (but not all) of our tests. You're correct that it's no longer necessary. Feel free to open a PR, or we'll hit it sometime soon as we do other updates.
actual
implementation oftestDbConnection()
for Android (TestUtilAndroid) checks if we are in instrumented test but in reality we never run instrumented test, andAndroidSqliteDriver
is never used.