deletes Db after tests
This commit is contained in:
+2
@@ -48,6 +48,8 @@ class AddressableTest {
|
||||
@After
|
||||
fun tearDown() {
|
||||
db.close()
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test.db")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+2
@@ -63,6 +63,8 @@ class LargeDBTests {
|
||||
@After
|
||||
fun tearDown() {
|
||||
db.close()
|
||||
val context = ApplicationProvider.getApplicationContext<Context>()
|
||||
context.deleteDatabase("test_large.db")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
+6
-2
@@ -179,9 +179,13 @@ class EventIndexesModule(
|
||||
filter: Filter,
|
||||
db: SQLiteDatabase,
|
||||
): List<Event> {
|
||||
val rowIdSubQuery = prepareRowIDSubQueries(filter) ?: return db.runQuery(makeEverythingQuery())
|
||||
val rowIdSubQuery = prepareRowIDSubQueries(filter)
|
||||
|
||||
return db.runQuery(makeQueryIn(rowIdSubQuery.sql), rowIdSubQuery.args)
|
||||
return if (rowIdSubQuery == null) {
|
||||
db.runQuery(makeEverythingQuery())
|
||||
} else {
|
||||
db.runQuery(makeQueryIn(rowIdSubQuery.sql), rowIdSubQuery.args)
|
||||
}
|
||||
}
|
||||
|
||||
fun query(
|
||||
|
||||
Reference in New Issue
Block a user