diff --git a/plugins/Live/tests/APITest.php b/plugins/Live/tests/APITest.php
index 588e467ad298a16a1346ebae595582843b4db1de..126e0ca106b45dd31273cd16a4282eca10541345 100644
--- a/plugins/Live/tests/APITest.php
+++ b/plugins/Live/tests/APITest.php
@@ -9,6 +9,7 @@
 namespace Piwik\Plugins\Live\tests;
 
 use Piwik\Date;
+use Piwik\Db;
 use Piwik\Plugins\Goals\API as GoalsApi;
 use Piwik\Plugins\Live\API;
 use FakeAccess;
@@ -108,6 +109,9 @@ class APITest extends \DatabaseTestCase
 
             $t->doTrackGoal(2);
         }
+
+        $GLOBALS['PIWIK_TRACKER_MODE'] = false;
+        Db::createDatabaseObject();
     }
 
     private function buildCounter($visits, $actions, $visitors, $visitsConverted)