From 9bd07468c2f8519c26108bb5ef9632d782f0457d Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 11 Dec 2025 17:13:36 -0500 Subject: [PATCH] deletes db before tests --- .../quartz/nip01Core/store/sqlite/AddressableTest.kt | 1 + .../quartz/nip01Core/store/sqlite/LargeDBTests.kt | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/AddressableTest.kt b/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/AddressableTest.kt index 628f24c34..f541dd007 100644 --- a/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/AddressableTest.kt +++ b/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/AddressableTest.kt @@ -41,6 +41,7 @@ class AddressableTest { @Before fun setup() { val context = ApplicationProvider.getApplicationContext() + context.deleteDatabase("test.db") db = EventStore(context, "test.db", relayUrl = "testUrl") } diff --git a/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/LargeDBTests.kt b/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/LargeDBTests.kt index 3d75a03e2..7bf8d362d 100644 --- a/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/LargeDBTests.kt +++ b/quartz/src/androidInstrumentedTest/kotlin/com/vitorpamplona/quartz/nip01Core/store/sqlite/LargeDBTests.kt @@ -56,20 +56,18 @@ class LargeDBTests { @Before fun setup() { val context = ApplicationProvider.getApplicationContext() + context.deleteDatabase("test_large.db") db = EventStore(context, "largeDBTest.db") - db.store.clearDB() } @After fun tearDown() { - db.store.clearDB() db.close() } @Test fun insertHeavyEvent() { events.first { it.id == "3f34b8cb682307ec11753de4669ce8948e95fd6fb360d79136446c5547fd235e" }.let { event -> - println(event.toJson()) try { val measure = measureTimeMillis {