diff --git a/app/src/androidTest/java/com/nextcloud/talk/migrations/MigrationsTest.kt b/app/src/androidTest/java/com/nextcloud/talk/migrations/MigrationsTest.kt index 0fe32b189a2..c2b38f1f658 100644 --- a/app/src/androidTest/java/com/nextcloud/talk/migrations/MigrationsTest.kt +++ b/app/src/androidTest/java/com/nextcloud/talk/migrations/MigrationsTest.kt @@ -53,18 +53,19 @@ class MigrationsTest { InstrumentationRegistry.getInstrumentation().targetContext, TalkDatabase::class.java, TEST_DB - ).addMigrations(*migrations).build().apply { + ).addMigrations( + *arrayOf( + Migrations.MIGRATION_6_8, + Migrations.MIGRATION_7_8, + Migrations.MIGRATION_8_9, + Migrations.MIGRATION_9_10 + ) + ).build().apply { openHelper.writableDatabase.close() } } companion object { private const val TEST_DB = "migration-test" - private val migrations = arrayOf( - Migrations.MIGRATION_6_8, - Migrations.MIGRATION_7_8, - Migrations.MIGRATION_8_9, - Migrations.MIGRATION_9_10 - ) } }