-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraalvmBasicRoomTest.kt
More file actions
43 lines (37 loc) · 1.66 KB
/
GraalvmBasicRoomTest.kt
File metadata and controls
43 lines (37 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright 2024, the wasm-sqlite-open-helper project authors and contributors. Please see the AUTHORS file
* for details. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
* SPDX-License-Identifier: Apache-2.0
*/
package ru.pixnews.wasm.sqlite.driver.graalvm
import org.junit.Rule
import org.junit.experimental.runners.Enclosed
import org.junit.rules.TemporaryFolder
import org.junit.runner.RunWith
import ru.pixnews.wasm.sqlite.binary.SqliteAndroidWasmEmscriptenIcu348
import ru.pixnews.wasm.sqlite.driver.WasmSQLiteDriver
import ru.pixnews.wasm.sqlite.driver.base.AndroidUserDatabaseSuspendFactory
import ru.pixnews.wasm.sqlite.driver.test.base.tests.room.AbstractBasicRoomTest
@RunWith(Enclosed::class)
class GraalvmBasicRoomTest {
class MultithreadingSqliteTest : AbstractBasicRoomTest<WasmSQLiteDriver<*>>(
driverFactory = GraalvmSqliteDriverFactory(),
databaseFactory = AndroidUserDatabaseSuspendFactory,
) {
@JvmField
@Rule
val tempFolder: TemporaryFolder = TemporaryFolder()
override fun fileInTempDir(databaseName: String): String = tempFolder.root.resolve(databaseName).path
}
class SingleThreadedSqliteTest : AbstractBasicRoomTest<WasmSQLiteDriver<*>>(
driverFactory = GraalvmSqliteDriverFactory(
defaultSqliteBinary = SqliteAndroidWasmEmscriptenIcu348,
),
databaseFactory = AndroidUserDatabaseSuspendFactory,
) {
@JvmField
@Rule
val tempFolder: TemporaryFolder = TemporaryFolder()
override fun fileInTempDir(databaseName: String): String = tempFolder.root.resolve(databaseName).path
}
}