summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/attribute
diff options
context:
space:
mode:
authorGeir Storli <geirst@verizonmedia.com>2020-06-25 15:52:56 +0000
committerGeir Storli <geirst@verizonmedia.com>2020-06-25 15:53:38 +0000
commit5eba0ecfd9fcd7ee0b9c0cd2074fe3e9ae7782cf (patch)
tree7ad165e86f57fd69f1ed8b6e6d5c69b859122427 /searchcore/src/tests/proton/attribute
parent4b5340c5fa6d78af845cc19d1667818fb7d6bf70 (diff)
Use ForegroundThreadExecutor in unit tests.
Diffstat (limited to 'searchcore/src/tests/proton/attribute')
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp6
-rw-r--r--searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp7
-rw-r--r--searchcore/src/tests/proton/attribute/attributeflush_test.cpp9
-rw-r--r--searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp7
4 files changed, 17 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
index c222bf4e18f..abcf35051fc 100644
--- a/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_manager/attribute_manager_test.cpp
@@ -34,6 +34,7 @@
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/searchlib/test/mock_gid_to_lid_mapping.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/util/foreground_thread_executor.h>
#include <vespa/vespalib/util/foregroundtaskexecutor.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
@@ -54,6 +55,7 @@ using proton::test::AttributeUtils;
using proton::test::createInt32Attribute;
using proton::test::Int32Attribute;
using vespalib::ForegroundTaskExecutor;
+using vespalib::ForegroundThreadExecutor;
using search::TuneFileAttributes;
using search::attribute::BasicType;
using search::attribute::IAttributeContext;
@@ -153,7 +155,7 @@ struct BaseFixture
DirectoryHandler _dirHandler;
DummyFileHeaderContext _fileHeaderContext;
ForegroundTaskExecutor _attributeFieldWriter;
- vespalib::ThreadStackExecutor _shared;
+ ForegroundThreadExecutor _shared;
HwInfo _hwInfo;
BaseFixture();
~BaseFixture();
@@ -167,7 +169,7 @@ BaseFixture::BaseFixture()
: _dirHandler(test_dir),
_fileHeaderContext(),
_attributeFieldWriter(),
- _shared(1, 128 * 1024),
+ _shared(),
_hwInfo()
{
}
diff --git a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
index 4951d0e3ed3..f81644c3f55 100644
--- a/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attribute_populator/attribute_populator_test.cpp
@@ -9,8 +9,8 @@
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/util/foreground_thread_executor.h>
#include <vespa/vespalib/util/foregroundtaskexecutor.h>
-#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/vespalib/util/stringfmt.h>
#include <vespa/log/log.h>
@@ -19,6 +19,7 @@ LOG_SETUP("attribute_populator_test");
using document::config_builder::DocumenttypesConfigBuilderHelper;
using document::config_builder::Struct;
using vespalib::ForegroundTaskExecutor;
+using vespalib::ForegroundThreadExecutor;
using namespace document;
using namespace proton;
using namespace search;
@@ -64,7 +65,7 @@ struct Fixture
DirectoryHandler _testDir;
DummyFileHeaderContext _fileHeader;
ForegroundTaskExecutor _attributeFieldWriter;
- vespalib::ThreadStackExecutor _shared;
+ ForegroundThreadExecutor _shared;
HwInfo _hwInfo;
AttributeManager::SP _mgr;
std::unique_ptr<AttributePopulator> _pop;
@@ -73,7 +74,7 @@ struct Fixture
: _testDir(TEST_DIR),
_fileHeader(),
_attributeFieldWriter(),
- _shared(1, 128 * 1024),
+ _shared(),
_hwInfo(),
_mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(),
_fileHeader, _attributeFieldWriter, _shared, _hwInfo)),
diff --git a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
index 09030be63ae..adf2f4a7d7d 100644
--- a/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attributeflush_test.cpp
@@ -8,13 +8,14 @@
#include <vespa/searchcore/proton/flushengine/shrink_lid_space_flush_target.h>
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/integerbase.h>
-#include <vespa/vespalib/util/foregroundtaskexecutor.h>
#include <vespa/searchlib/common/indexmetainfo.h>
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/vespalib/datastore/datastorebase.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/util/foreground_thread_executor.h>
+#include <vespa/vespalib/util/foregroundtaskexecutor.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/log/log.h>
@@ -246,7 +247,7 @@ struct BaseFixture
test::DirectoryHandler _dirHandler;
DummyFileHeaderContext _fileHeaderContext;
ForegroundTaskExecutor _attributeFieldWriter;
- vespalib::ThreadStackExecutor _shared;
+ ForegroundThreadExecutor _shared;
HwInfo _hwInfo;
BaseFixture();
BaseFixture(const HwInfo &hwInfo);
@@ -257,14 +258,14 @@ BaseFixture::BaseFixture()
: _dirHandler(test_dir),
_fileHeaderContext(),
_attributeFieldWriter(),
- _shared(1, 128 * 1024),
+ _shared(),
_hwInfo()
{ }
BaseFixture::BaseFixture(const HwInfo &hwInfo)
: _dirHandler(test_dir),
_fileHeaderContext(),
_attributeFieldWriter(),
- _shared(1, 128 * 1024),
+ _shared(),
_hwInfo(hwInfo)
{}
BaseFixture::~BaseFixture() = default;
diff --git a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
index 87473f3da97..094ae1a1400 100644
--- a/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
+++ b/searchcore/src/tests/proton/attribute/attributes_state_explorer/attributes_state_explorer_test.cpp
@@ -10,8 +10,8 @@
#include <vespa/searchlib/test/directory_handler.h>
#include <vespa/vespalib/test/insertion_operators.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/vespalib/util/foreground_thread_executor.h>
#include <vespa/vespalib/util/foregroundtaskexecutor.h>
-#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/log/log.h>
LOG_SETUP("attributes_state_explorer_test");
@@ -20,6 +20,7 @@ using namespace proton;
using namespace proton::test;
using search::AttributeVector;
using vespalib::ForegroundTaskExecutor;
+using vespalib::ForegroundThreadExecutor;
using search::TuneFileAttributes;
using search::index::DummyFileHeaderContext;
using search::test::DirectoryHandler;
@@ -31,7 +32,7 @@ struct Fixture
DirectoryHandler _dirHandler;
DummyFileHeaderContext _fileHeaderContext;
ForegroundTaskExecutor _attributeFieldWriter;
- vespalib::ThreadStackExecutor _shared;
+ ForegroundThreadExecutor _shared;
HwInfo _hwInfo;
AttributeManager::SP _mgr;
AttributeManagerExplorer _explorer;
@@ -39,7 +40,7 @@ struct Fixture
: _dirHandler(TEST_DIR),
_fileHeaderContext(),
_attributeFieldWriter(),
- _shared(1, 128 * 1024),
+ _shared(),
_hwInfo(),
_mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(),
_fileHeaderContext,