Skip to content
Snippets Groups Projects
Commit f4dd5171 authored by Sebastian's avatar Sebastian
Browse files

Add some logging during test

parent 44531e43
No related branches found
No related tags found
No related merge requests found
Pipeline #7363 failed
package org.briarproject.mailbox.core
import android.util.Log
import kotlinx.coroutines.runBlocking
import org.junit.Test
import org.sqlite.mc.SQLiteMCConfig
......@@ -12,12 +13,16 @@ import kotlin.test.assertTrue
class DatabaseCreationTest {
companion object {
val LOG_TAG = "db test"
}
@Test
fun createDatabase(): Unit = runBlocking {
Class.forName("org.sqlite.JDBC")
val file: Path = Files.createTempFile("test", ".sqlite")
println(file)
Log.i(LOG_TAG, "file: $file")
val connection: Connection = DriverManager.getConnection(
"jdbc:sqlite:$file",
SQLiteMCConfig().withKey("very-secret").toProperties()
......@@ -36,6 +41,7 @@ class DatabaseCreationTest {
val id = results.getInt(1)
val name = results.getString(2)
Log.i(LOG_TAG, "row: $id $name")
when (i) {
0 -> {
assertEquals(1, id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment