diff --git a/tests/tests/database/src/android/database/cts/AbstractCursorTest.java b/tests/tests/database/src/android/database/cts/AbstractCursorTest.java
index bc404fe..14462a0 100644
--- a/tests/tests/database/src/android/database/cts/AbstractCursorTest.java
+++ b/tests/tests/database/src/android/database/cts/AbstractCursorTest.java
@@ -67,6 +67,15 @@
         mTestAbstractCursor = new TestAbstractCursor(COLUMN_NAMES, list);
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        mDatabase.close();
+        if (mDatabaseFile.exists()) {
+            mDatabaseFile.delete();
+        }
+        super.tearDown();
+    }
+
     @TestTargetNew(
         level = TestLevel.COMPLETE,
         method = "AbstractCursor",
diff --git a/tests/tests/database/src/android/database/cts/CursorWrapperTest.java b/tests/tests/database/src/android/database/cts/CursorWrapperTest.java
index c32cd89..507b2a3 100644
--- a/tests/tests/database/src/android/database/cts/CursorWrapperTest.java
+++ b/tests/tests/database/src/android/database/cts/CursorWrapperTest.java
@@ -19,6 +19,8 @@
 import java.io.File;
 import java.util.Arrays;
 
+import junit.framework.TestCase;
+
 import android.content.ContentResolver;
 import android.content.Context;
 import android.content.IContentProvider;
@@ -39,7 +41,7 @@
 import dalvik.annotation.TestTargetClass;
 
 @TestTargetClass(android.database.CursorWrapper.class)
-public class CursorWrapperTest extends DatabaseCursorTest {
+public class CursorWrapperTest extends TestCase {
 
     private static final String FIRST_NUMBER = "123";
     private static final String SECOND_NUMBER = "5555";
@@ -61,7 +63,6 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        setupTestType(TYPE_CURSORWRAPPER);
         setupDatabase();
     }
 
diff --git a/tests/tests/database/src/android/database/sqlite/cts/SQLiteDatabaseTest.java b/tests/tests/database/src/android/database/sqlite/cts/SQLiteDatabaseTest.java
index 0791bcd..bc351f5 100644
--- a/tests/tests/database/src/android/database/sqlite/cts/SQLiteDatabaseTest.java
+++ b/tests/tests/database/src/android/database/sqlite/cts/SQLiteDatabaseTest.java
@@ -454,17 +454,26 @@
     })
     @ToBeFixed(bug = "1676383", explanation = "setPageSize does not work as javadoc declares.")
     public void testAccessPageSize() {
-        mDatabaseFile = new File(mDatabaseDir, "database.db");
-        if (mDatabaseFile.exists()) {
-            mDatabaseFile.delete();
+        File databaseFile = new File(mDatabaseDir, "database.db");
+        if (databaseFile.exists()) {
+            databaseFile.delete();
         }
-        mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null);
+        SQLiteDatabase database = null;
+        try {
+            database = SQLiteDatabase.openOrCreateDatabase(databaseFile.getPath(), null);
 
-        long initialValue = mDatabase.getPageSize();
-        // check that this does not throw an exception
-        // setting a different page size may not be supported after the DB has been created
-        mDatabase.setPageSize(initialValue);
-        assertEquals(initialValue, mDatabase.getPageSize());
+            long initialValue = database.getPageSize();
+            // check that this does not throw an exception
+            // setting a different page size may not be supported after the DB has been created
+            database.setPageSize(initialValue);
+            assertEquals(initialValue, database.getPageSize());
+
+        } finally {
+            if (database != null) {
+                database.close();
+                databaseFile.delete();
+            }
+        }
     }
 
     @TestTargetNew(
@@ -827,9 +836,16 @@
     public void testIsReadOnly() {
         assertFalse(mDatabase.isReadOnly());
 
-        mDatabase = SQLiteDatabase.openDatabase(mDatabaseFilePath, null,
-                SQLiteDatabase.OPEN_READONLY);
-        assertTrue(mDatabase.isReadOnly());
+        SQLiteDatabase database = null;
+        try {
+            database = SQLiteDatabase.openDatabase(mDatabaseFilePath, null,
+                    SQLiteDatabase.OPEN_READONLY);
+            assertTrue(database.isReadOnly());
+        } finally {
+            if (database != null) {
+                database.close();
+            }
+        }
     }
 
     @TestTargetNew(
