]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/tests/testStoreController.cc
Fix Controller.cc TheRoot assertion during shutdown (#1707)
[thirdparty/squid.git] / src / tests / testStoreController.cc
index 06e8f8fbb0b6eeadaaac7cbac25c6b6d6b9f6889..205dc59b8c052d468073dfce42a09673812aedf6 100644 (file)
@@ -46,7 +46,6 @@ addSwapDir(TestSwapDirPointer aStore)
 void
 TestStoreController::testStats()
 {
-    Store::Init();
     StoreEntry *logEntry = new StoreEntry;
     logEntry->createMemObject("dummy_storeId", nullptr, HttpRequestMethod());
     logEntry->store_status = STORE_PENDING;
@@ -60,7 +59,6 @@ TestStoreController::testStats()
     free_cachedir(&Config.cacheSwap);
     CPPUNIT_ASSERT_EQUAL(true, aStore->statsCalled);
     CPPUNIT_ASSERT_EQUAL(true, aStore2->statsCalled);
-    Store::FreeMemory();
 }
 
 static void
@@ -91,14 +89,12 @@ TestStoreController::testMaxSize()
     StoreEntry *logEntry = new StoreEntry;
     logEntry->createMemObject("dummy_storeId", nullptr, HttpRequestMethod());
     logEntry->store_status = STORE_PENDING;
-    Store::Init();
     TestSwapDirPointer aStore (new TestSwapDir);
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
     addSwapDir(aStore2);
     CPPUNIT_ASSERT_EQUAL(static_cast<uint64_t>(6), Store::Root().maxSize());
     free_cachedir(&Config.cacheSwap);
-    Store::FreeMemory();
 }
 
 static StoreEntry *
@@ -147,7 +143,6 @@ void
 TestStoreController::testSearch()
 {
     commonInit();
-    Store::Init();
     TestSwapDirPointer aStore (new TestSwapDir);
     TestSwapDirPointer aStore2 (new TestSwapDir);
     addSwapDir(aStore);
@@ -195,8 +190,6 @@ TestStoreController::testSearch()
     CPPUNIT_ASSERT_EQUAL(true, search->isDone());
     CPPUNIT_ASSERT_EQUAL(static_cast<StoreEntry *>(nullptr), search->currentItem());
     //CPPUNIT_ASSERT_EQUAL(false, search->next());
-
-    Store::FreeMemory();
 }
 
 // This test uses main() from ./testStore.cc.