diff options
Diffstat (limited to 'memfilepersistence/src/tests')
4 files changed, 1 insertions, 30 deletions
diff --git a/memfilepersistence/src/tests/spi/memcachetest.cpp b/memfilepersistence/src/tests/spi/memcachetest.cpp index 73815df563a..5e9f1a28225 100644 --- a/memfilepersistence/src/tests/spi/memcachetest.cpp +++ b/memfilepersistence/src/tests/spi/memcachetest.cpp @@ -1,7 +1,6 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/memfilepersistence/memfile/memfilecache.h> -#include <vespa/storageframework/defaultimplementation/memory/simplememorylogic.h> #include <tests/spi/memfiletestutils.h> @@ -41,7 +40,6 @@ private: framework::defaultimplementation::ComponentRegisterImpl::UP _register; framework::Component::UP _component; FakeClock::UP _clock; - framework::defaultimplementation::MemoryManager::UP _memoryManager; std::unique_ptr<MemFilePersistenceMetrics> _metrics; std::unique_ptr<MemFileCache> _cache; @@ -113,18 +111,10 @@ private: new framework::defaultimplementation::ComponentRegisterImpl); _clock.reset(new FakeClock); _register->setClock(*_clock); - _memoryManager.reset( - new framework::defaultimplementation::MemoryManager( - framework::defaultimplementation::AllocationLogic::UP( - new framework::defaultimplementation::SimpleMemoryLogic( - *_clock, maxMemory * 2)))); - _register->setMemoryManager(*_memoryManager); _component.reset(new framework::Component(*_register, "testcomponent")); _metrics.reset(new MemFilePersistenceMetrics(*_component)); _cache.reset(new MemFileCache(*_register, _metrics->_cache)); setCacheSize(maxMemory); - _memoryManager->registerAllocationType(framework::MemoryAllocationType( - "steal", framework::MemoryAllocationType::FORCE_ALLOCATE)); } public: @@ -133,7 +123,6 @@ public: _metrics.reset(0); _component.reset(0); _register.reset(0); - _memoryManager.reset(0); _clock.reset(0); } }; diff --git a/memfilepersistence/src/tests/spi/memfiletestutils.cpp b/memfilepersistence/src/tests/spi/memfiletestutils.cpp index bb35aa4d03e..cd14e989220 100644 --- a/memfilepersistence/src/tests/spi/memfiletestutils.cpp +++ b/memfilepersistence/src/tests/spi/memfiletestutils.cpp @@ -5,7 +5,6 @@ #include <tests/spi/memfiletestutils.h> #include <tests/spi/simulatedfailurefile.h> #include <vespa/memfilepersistence/memfile/memfilecache.h> -#include <vespa/storageframework/defaultimplementation/memory/simplememorylogic.h> #include <vespa/document/update/assignvalueupdate.h> #include <vespa/document/test/make_bucket_space.h> #include <vespa/persistence/spi/test.h> @@ -72,12 +71,6 @@ MemFileTestUtils::setupDisks(uint32_t numDisks) { new framework::defaultimplementation::ComponentRegisterImpl); _clock.reset(new FakeClock); _componentRegister->setClock(*_clock); - _memoryManager.reset( - new framework::defaultimplementation::MemoryManager( - framework::defaultimplementation::AllocationLogic::UP( - new framework::defaultimplementation::SimpleMemoryLogic( - *_clock, 1024 * 1024 * 1024)))); - _componentRegister->setMemoryManager(*_memoryManager); _env.reset(new MemFileTestEnvironment(numDisks, *_componentRegister, *getTypeRepo())); diff --git a/memfilepersistence/src/tests/spi/memfiletestutils.h b/memfilepersistence/src/tests/spi/memfiletestutils.h index dde73c88164..450d87451b9 100644 --- a/memfilepersistence/src/tests/spi/memfiletestutils.h +++ b/memfilepersistence/src/tests/spi/memfiletestutils.h @@ -20,8 +20,6 @@ #include <vespa/document/update/documentupdate.h> #include <vespa/storageframework/defaultimplementation/clock/realclock.h> #include <vespa/storageframework/defaultimplementation/component/componentregisterimpl.h> -#include <vespa/storageframework/defaultimplementation/memory/memorymanager.h> - namespace storage { namespace memfile { @@ -70,7 +68,6 @@ private: document::BucketIdFactory _bucketIdFactory; framework::defaultimplementation::ComponentRegisterImpl::UP _componentRegister; FakeClock::UP _clock; - framework::defaultimplementation::MemoryManager::UP _memoryManager; std::unique_ptr<MemFileTestEnvironment> _env; public: @@ -82,7 +79,6 @@ public: void tearDown() override{ _env.reset(); _componentRegister.reset(); - _memoryManager.reset(); _clock.reset(); } diff --git a/memfilepersistence/src/tests/spi/providerconformancetest.cpp b/memfilepersistence/src/tests/spi/providerconformancetest.cpp index db02e619782..625549f0008 100644 --- a/memfilepersistence/src/tests/spi/providerconformancetest.cpp +++ b/memfilepersistence/src/tests/spi/providerconformancetest.cpp @@ -2,7 +2,6 @@ #include "memfiletestutils.h" #include <vespa/persistence/conformancetest/conformancetest.h> -#include <vespa/storageframework/defaultimplementation/memory/simplememorylogic.h> namespace storage { namespace memfile { @@ -11,19 +10,13 @@ struct ProviderConformanceTest : public spi::ConformanceTest { struct Factory : public PersistenceFactory { framework::defaultimplementation::ComponentRegisterImpl _compRegister; framework::defaultimplementation::RealClock _clock; - framework::defaultimplementation::MemoryManager _memoryManager; std::unique_ptr<MemFileCache> cache; Factory() : _compRegister(), - _clock(), - _memoryManager( - framework::defaultimplementation::AllocationLogic::UP( - new framework::defaultimplementation::SimpleMemoryLogic( - _clock, 1024 * 1024 * 1024))) + _clock() { _compRegister.setClock(_clock); - _compRegister.setMemoryManager(_memoryManager); } spi::PersistenceProvider::UP |