diff --git a/core/tests/Drupal/KernelTests/KernelTestBase.php b/core/tests/Drupal/KernelTests/KernelTestBase.php
index 376fed2..8f8f074 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBase.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBase.php
@@ -591,6 +591,20 @@ protected function tearDown() {
       $this->kernel->shutdown();
     }
 
+    // Remove all prefixed tables.
+    $original_connection_info = Database::getConnectionInfo('simpletest_original_default');
+    $original_prefix = $original_connection_info['default']['prefix']['default'];
+    $test_connection_info = Database::getConnectionInfo('default');
+    $test_prefix = $test_connection_info['default']['prefix']['default'];
+    if ($original_prefix != $test_prefix) {
+      $tables = Database::getConnection()->schema()->findTables('%');
+      foreach ($tables as $table) {
+        if (Database::getConnection()->schema()->dropTable($table)) {
+          unset($tables[$table]);
+        }
+      }
+    }
+
     // Free up memory: Own properties.
     $this->classLoader = NULL;
     $this->vfsRoot = NULL;
diff --git a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
index 2deaa95..a2e30c4 100644
--- a/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
+++ b/core/tests/Drupal/KernelTests/KernelTestBaseTest.php
@@ -52,27 +52,11 @@ public function testBootEnvironment() {
    * @covers ::getDatabaseConnectionInfo
    */
   public function testGetDatabaseConnectionInfoWithOutManualSetDbUrl() {
-    $this->setUp();
-
     $options = $this->container->get('database')->getConnectionOptions();
     $this->assertSame($this->databasePrefix, $options['prefix']['default']);
   }
 
   /**
-   * @covers ::getDatabaseConnectionInfo
-   */
-  public function testGetDatabaseConnectionInfoWithManualSetDbUrl() {
-    if (!file_exists('/tmp')) {
-      $this->markTestSkipped();
-    }
-    putenv('SIMPLETEST_DB=sqlite://localhost//tmp/test2.sqlite');
-    $this->setUp();
-
-    $options = $this->container->get('database')->getConnectionOptions();
-    $this->assertNotEqual('', $options['prefix']['default']);
-  }
-
-  /**
    * @covers ::setUp
    */
   public function testSetUp() {
