summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/CMakeLists.txt1
-rw-r--r--document/src/vespa/document/test/CMakeLists.txt6
-rw-r--r--document/src/vespa/document/test/make_document_bucket.cpp (renamed from storage/src/tests/common/make_document_bucket.cpp)6
-rw-r--r--document/src/vespa/document/test/make_document_bucket.h (renamed from storage/src/tests/common/make_document_bucket.h)4
-rw-r--r--storage/src/tests/bucketdb/bucketmanagertest.cpp4
-rw-r--r--storage/src/tests/common/CMakeLists.txt1
-rw-r--r--storage/src/tests/common/storagelinktest.cpp4
-rw-r--r--storage/src/tests/distributor/bucketdbupdatertest.cpp4
-rw-r--r--storage/src/tests/distributor/distributortest.cpp4
-rw-r--r--storage/src/tests/distributor/externaloperationhandlertest.cpp4
-rw-r--r--storage/src/tests/distributor/getoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/idealstatemanagertest.cpp4
-rw-r--r--storage/src/tests/distributor/mergeoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/pendingmessagetrackertest.cpp4
-rw-r--r--storage/src/tests/distributor/putoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/removelocationtest.cpp4
-rw-r--r--storage/src/tests/distributor/removeoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/splitbuckettest.cpp4
-rw-r--r--storage/src/tests/distributor/statoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/twophaseupdateoperationtest.cpp4
-rw-r--r--storage/src/tests/distributor/updateoperationtest.cpp4
-rw-r--r--storage/src/tests/persistence/common/filestortestfixture.cpp4
-rw-r--r--storage/src/tests/persistence/diskmoveoperationhandlertest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/deletebuckettest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/mergeblockingtest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/operationabortingtest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/sanitycheckeddeletetest.cpp4
-rw-r--r--storage/src/tests/persistence/filestorage/singlebucketjointest.cpp4
-rw-r--r--storage/src/tests/persistence/legacyoperationhandlertest.cpp4
-rw-r--r--storage/src/tests/persistence/mergehandlertest.cpp4
-rw-r--r--storage/src/tests/persistence/persistencequeuetest.cpp4
-rw-r--r--storage/src/tests/persistence/persistencetestutils.cpp4
-rw-r--r--storage/src/tests/persistence/persistencethread_splittest.cpp4
-rw-r--r--storage/src/tests/persistence/processalltest.cpp4
-rw-r--r--storage/src/tests/persistence/testandsettest.cpp4
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp4
-rw-r--r--storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp4
-rw-r--r--storage/src/tests/storageserver/communicationmanagertest.cpp4
-rw-r--r--storage/src/tests/storageserver/documentapiconvertertest.cpp4
-rw-r--r--storage/src/tests/storageserver/mergethrottlertest.cpp4
-rw-r--r--storage/src/tests/visiting/visitormanagertest.cpp4
-rw-r--r--storageapi/src/tests/mbusprot/storageprotocoltest.cpp11
-rw-r--r--storageserver/src/tests/storageservertest.cpp7
45 files changed, 90 insertions, 95 deletions
diff --git a/document/CMakeLists.txt b/document/CMakeLists.txt
index 72f4ee445fb..fd347ca492d 100644
--- a/document/CMakeLists.txt
+++ b/document/CMakeLists.txt
@@ -23,6 +23,7 @@ vespa_define_module(
src/vespa/document/serialization
src/vespa/document/update
src/vespa/document/util
+ src/vespa/document/test
TEST_DEPENDS
vdstestlib
diff --git a/document/src/vespa/document/CMakeLists.txt b/document/src/vespa/document/CMakeLists.txt
index 8d6999fdc24..7ae341f6d4b 100644
--- a/document/src/vespa/document/CMakeLists.txt
+++ b/document/src/vespa/document/CMakeLists.txt
@@ -14,6 +14,7 @@ vespa_add_library(document
$<TARGET_OBJECTS:document_repo>
$<TARGET_OBJECTS:document_serialization>
$<TARGET_OBJECTS:document_predicate>
+ $<TARGET_OBJECTS:document_test>
INSTALL lib64
DEPENDS
)
diff --git a/document/src/vespa/document/test/CMakeLists.txt b/document/src/vespa/document/test/CMakeLists.txt
new file mode 100644
index 00000000000..f16bfe0144a
--- /dev/null
+++ b/document/src/vespa/document/test/CMakeLists.txt
@@ -0,0 +1,6 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+vespa_add_library(document_test OBJECT
+ SOURCES
+ make_document_bucket.cpp
+ DEPENDS
+)
diff --git a/storage/src/tests/common/make_document_bucket.cpp b/document/src/vespa/document/test/make_document_bucket.cpp
index cef33c515ee..f4d22f7b83f 100644
--- a/storage/src/tests/common/make_document_bucket.cpp
+++ b/document/src/vespa/document/test/make_document_bucket.cpp
@@ -2,11 +2,7 @@
#include "make_document_bucket.h"
-using document::Bucket;
-using document::BucketId;
-using document::BucketSpace;
-
-namespace storage::test {
+namespace document::test {
Bucket makeDocumentBucket(BucketId bucketId)
{
diff --git a/storage/src/tests/common/make_document_bucket.h b/document/src/vespa/document/test/make_document_bucket.h
index a95bc501c65..8c7411cc0e8 100644
--- a/storage/src/tests/common/make_document_bucket.h
+++ b/document/src/vespa/document/test/make_document_bucket.h
@@ -4,10 +4,10 @@
#include <vespa/document/bucket/bucket.h>
-namespace storage::test {
+namespace document::test {
// Helper function used by unit tests
-document::Bucket makeDocumentBucket(document::BucketId bucketId);
+Bucket makeDocumentBucket(BucketId bucketId);
}
diff --git a/storage/src/tests/bucketdb/bucketmanagertest.cpp b/storage/src/tests/bucketdb/bucketmanagertest.cpp
index 9b3ef4bf2e8..98f3e06fc62 100644
--- a/storage/src/tests/bucketdb/bucketmanagertest.cpp
+++ b/storage/src/tests/bucketdb/bucketmanagertest.cpp
@@ -14,7 +14,7 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/dummystoragelink.h>
#include <tests/common/testhelper.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdslib/state/random.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -30,7 +30,7 @@ using document::DocumenttypesConfig;
using config::FileSpec;
using document::DocumentType;
using document::DocumentTypeRepo;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/common/CMakeLists.txt b/storage/src/tests/common/CMakeLists.txt
index dc322c345e3..c7243e68146 100644
--- a/storage/src/tests/common/CMakeLists.txt
+++ b/storage/src/tests/common/CMakeLists.txt
@@ -3,7 +3,6 @@ vespa_add_library(storage_testcommon TEST
SOURCES
dummystoragelink.cpp
testhelper.cpp
- make_document_bucket.cpp
metricstest.cpp
storagelinktest.cpp
testnodestateupdater.cpp
diff --git a/storage/src/tests/common/storagelinktest.cpp b/storage/src/tests/common/storagelinktest.cpp
index 0490581d7ff..95fe8ad23da 100644
--- a/storage/src/tests/common/storagelinktest.cpp
+++ b/storage/src/tests/common/storagelinktest.cpp
@@ -1,12 +1,12 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <tests/common/storagelinktest.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <iostream>
#include <string>
#include <vespa/storageapi/message/stat.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/distributor/bucketdbupdatertest.cpp b/storage/src/tests/distributor/bucketdbupdatertest.cpp
index 54a5f3ec4b1..f9578fc47a4 100644
--- a/storage/src/tests/distributor/bucketdbupdatertest.cpp
+++ b/storage/src/tests/distributor/bucketdbupdatertest.cpp
@@ -8,14 +8,14 @@
#include <vespa/storageframework/defaultimplementation/clock/realclock.h>
#include <vespa/storage/storageutil/distributorstatecache.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/simpleclusterinformation.h>
#include <vespa/storage/distributor/distributor.h>
#include <vespa/vespalib/text/stringtokenizer.h>
using namespace storage::api;
using namespace storage::lib;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp
index e40add9b76d..b830aa6d506 100644
--- a/storage/src/tests/distributor/distributortest.cpp
+++ b/storage/src/tests/distributor/distributortest.cpp
@@ -9,13 +9,13 @@
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/config/config-stor-distributormanager.h>
#include <tests/common/dummystoragelink.h>
#include <vespa/storage/distributor/distributor.h>
#include <vespa/vespalib/text/stringtokenizer.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/distributor/externaloperationhandlertest.cpp b/storage/src/tests/distributor/externaloperationhandlertest.cpp
index a66a22c7eb1..6cf8d068231 100644
--- a/storage/src/tests/distributor/externaloperationhandlertest.cpp
+++ b/storage/src/tests/distributor/externaloperationhandlertest.cpp
@@ -5,9 +5,9 @@
#include <vespa/storage/distributor/operation_sequencer.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storage/distributor/distributor.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/getoperationtest.cpp b/storage/src/tests/distributor/getoperationtest.cpp
index 315152e4683..ee1ea70163f 100644
--- a/storage/src/tests/distributor/getoperationtest.cpp
+++ b/storage/src/tests/distributor/getoperationtest.cpp
@@ -8,7 +8,7 @@
#include <tests/distributor/distributortestutil.h>
#include <vespa/storageapi/message/persistence.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/config/helper/configgetter.hpp>
@@ -21,7 +21,7 @@ using std::shared_ptr;
using config::ConfigGetter;
using document::DocumenttypesConfig;
using config::FileSpec;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp
index 8f4b99d9d7f..e48046fb4ac 100644
--- a/storage/src/tests/distributor/idealstatemanagertest.cpp
+++ b/storage/src/tests/distributor/idealstatemanagertest.cpp
@@ -9,9 +9,9 @@
#include <vespa/storageapi/message/visitor.h>
#include <vespa/storageapi/message/bucketsplitting.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/mergeoperationtest.cpp b/storage/src/tests/distributor/mergeoperationtest.cpp
index d33ee64a883..f1db60a5ef4 100644
--- a/storage/src/tests/distributor/mergeoperationtest.cpp
+++ b/storage/src/tests/distributor/mergeoperationtest.cpp
@@ -8,12 +8,12 @@
#include <vespa/storage/distributor/operations/idealstate/mergeoperation.h>
#include <vespa/storage/distributor/bucketdbupdater.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/distributor.h>
#include <vespa/vespalib/text/stringtokenizer.h>
using std::shared_ptr;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/pendingmessagetrackertest.cpp b/storage/src/tests/distributor/pendingmessagetrackertest.cpp
index 1fc12821e1d..6aba8e1fb98 100644
--- a/storage/src/tests/distributor/pendingmessagetrackertest.cpp
+++ b/storage/src/tests/distributor/pendingmessagetrackertest.cpp
@@ -7,11 +7,11 @@
#include <vespa/storageapi/message/persistence.h>
#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdslib/state/random.h>
#include <vespa/vdstestlib/cppunit/macros.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp
index 156fc2fc8ca..5cc9a26a9ea 100644
--- a/storage/src/tests/distributor/putoperationtest.cpp
+++ b/storage/src/tests/distributor/putoperationtest.cpp
@@ -10,7 +10,7 @@
#include <vespa/storageapi/message/state.h>
#include <tests/distributor/distributortestutil.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/text/stringtokenizer.h>
#include <vespa/vespalib/testkit/test_kit.h>
@@ -27,7 +27,7 @@ using namespace storage;
using namespace storage::api;
using namespace storage::lib;
using namespace std::literals::string_literals;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/distributor/removelocationtest.cpp b/storage/src/tests/distributor/removelocationtest.cpp
index 975d77d870f..8c55b7e715c 100644
--- a/storage/src/tests/distributor/removelocationtest.cpp
+++ b/storage/src/tests/distributor/removelocationtest.cpp
@@ -6,10 +6,10 @@
#include <vespa/storageapi/message/removelocation.h>
#include <vespa/storage/distributor/operations/external/removelocationoperation.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/distributor.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/removeoperationtest.cpp b/storage/src/tests/distributor/removeoperationtest.cpp
index 013d62bac14..4c2f1bba00d 100644
--- a/storage/src/tests/distributor/removeoperationtest.cpp
+++ b/storage/src/tests/distributor/removeoperationtest.cpp
@@ -6,10 +6,10 @@
#include <vespa/storage/distributor/distributor.h>
#include <vespa/storageapi/message/persistence.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/operations/external/removeoperation.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/splitbuckettest.cpp b/storage/src/tests/distributor/splitbuckettest.cpp
index e4c90dcbbe3..2caf8f106f1 100644
--- a/storage/src/tests/distributor/splitbuckettest.cpp
+++ b/storage/src/tests/distributor/splitbuckettest.cpp
@@ -9,12 +9,12 @@
#include <vespa/storage/distributor/idealstatemanager.h>
#include <vespa/storageapi/message/multioperation.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/distributor.h>
using std::shared_ptr;
using namespace document;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/distributor/statoperationtest.cpp b/storage/src/tests/distributor/statoperationtest.cpp
index e9364b06085..442d74503ab 100644
--- a/storage/src/tests/distributor/statoperationtest.cpp
+++ b/storage/src/tests/distributor/statoperationtest.cpp
@@ -4,12 +4,12 @@
#include <vespa/storageapi/message/stat.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/operations/external/statbucketoperation.h>
#include <vespa/storage/distributor/operations/external/statbucketlistoperation.h>
#include <vespa/storage/distributor/distributor.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
index 7d3c61d5674..9f6a7010179 100644
--- a/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
+++ b/storage/src/tests/distributor/twophaseupdateoperationtest.cpp
@@ -13,10 +13,10 @@
#include <vespa/storage/distributor/operations/external/twophaseupdateoperation.h>
#include <vespa/storageapi/message/batch.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/distributor.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace distributor {
diff --git a/storage/src/tests/distributor/updateoperationtest.cpp b/storage/src/tests/distributor/updateoperationtest.cpp
index 425751ee0d0..62590eabdad 100644
--- a/storage/src/tests/distributor/updateoperationtest.cpp
+++ b/storage/src/tests/distributor/updateoperationtest.cpp
@@ -7,7 +7,7 @@
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/bucket.h>
#include <tests/distributor/distributortestutil.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/distributor/operations/external/updateoperation.h>
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/storage/distributor/distributor.h>
@@ -23,7 +23,7 @@ using namespace storage::lib;
using config::ConfigGetter;
using config::FileSpec;
using vespalib::string;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
class UpdateOperation_Test : public CppUnit::TestFixture,
public DistributorTestUtil
diff --git a/storage/src/tests/persistence/common/filestortestfixture.cpp b/storage/src/tests/persistence/common/filestortestfixture.cpp
index 2fd070de394..4694e8df363 100644
--- a/storage/src/tests/persistence/common/filestortestfixture.cpp
+++ b/storage/src/tests/persistence/common/filestortestfixture.cpp
@@ -4,12 +4,12 @@
#include <vespa/storage/persistence/filestorage/filestormanager.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/spi/test.h>
#include <sstream>
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/diskmoveoperationhandlertest.cpp b/storage/src/tests/persistence/diskmoveoperationhandlertest.cpp
index 6dd05c238d5..def9dd6ec6e 100644
--- a/storage/src/tests/persistence/diskmoveoperationhandlertest.cpp
+++ b/storage/src/tests/persistence/diskmoveoperationhandlertest.cpp
@@ -4,9 +4,9 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storage/persistence/messages.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/filestorage/deletebuckettest.cpp b/storage/src/tests/persistence/filestorage/deletebuckettest.cpp
index e6da51e103a..3e0f36a6cdd 100644
--- a/storage/src/tests/persistence/filestorage/deletebuckettest.cpp
+++ b/storage/src/tests/persistence/filestorage/deletebuckettest.cpp
@@ -4,13 +4,13 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storageapi/message/bucket.h>
#include <tests/persistence/common/persistenceproviderwrapper.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
LOG_SETUP(".deletebuckettest");
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index 001e3a0c6ca..7b6bd4c5a86 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -4,7 +4,7 @@
#include <tests/common/storagelinktest.h>
#include <tests/common/teststorageapp.h>
#include <tests/persistence/filestorage/forwardingmessagesender.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/storageserver/statemanager.h>
#include <vespa/storage/bucketdb/bucketmanager.h>
#include <vespa/storage/persistence/persistencethread.h>
@@ -41,7 +41,7 @@ using std::unique_ptr;
using document::Document;
using namespace storage::api;
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
#define ASSERT_SINGLE_REPLY(replytype, reply, link, time) \
reply = 0; \
diff --git a/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp b/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp
index 8bf8ac087b9..50999f5883e 100644
--- a/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp
+++ b/storage/src/tests/persistence/filestorage/mergeblockingtest.cpp
@@ -6,9 +6,9 @@
#include <tests/persistence/common/persistenceproviderwrapper.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/filestorage/operationabortingtest.cpp b/storage/src/tests/persistence/filestorage/operationabortingtest.cpp
index f3054132cb9..aab0aa2c0fb 100644
--- a/storage/src/tests/persistence/filestorage/operationabortingtest.cpp
+++ b/storage/src/tests/persistence/filestorage/operationabortingtest.cpp
@@ -5,7 +5,7 @@
#include <tests/persistence/common/persistenceproviderwrapper.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vespalib/util/barrier.h>
#include <vespa/vespalib/util/thread.h>
#include <vespa/vespalib/stllike/hash_set_insert.hpp>
@@ -13,7 +13,7 @@
#include <vespa/log/log.h>
LOG_SETUP(".operationabortingtest");
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/filestorage/sanitycheckeddeletetest.cpp b/storage/src/tests/persistence/filestorage/sanitycheckeddeletetest.cpp
index cbb1cb48f3e..6f8741876aa 100644
--- a/storage/src/tests/persistence/filestorage/sanitycheckeddeletetest.cpp
+++ b/storage/src/tests/persistence/filestorage/sanitycheckeddeletetest.cpp
@@ -4,12 +4,12 @@
#include <vespa/storageapi/message/bucket.h>
#include <vespa/persistence/spi/test.h>
#include <tests/persistence/common/persistenceproviderwrapper.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/filestorage/singlebucketjointest.cpp b/storage/src/tests/persistence/filestorage/singlebucketjointest.cpp
index 83d79ab4d77..8e6340c930c 100644
--- a/storage/src/tests/persistence/filestorage/singlebucketjointest.cpp
+++ b/storage/src/tests/persistence/filestorage/singlebucketjointest.cpp
@@ -7,11 +7,11 @@
#include <tests/persistence/common/persistenceproviderwrapper.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
LOG_SETUP(".singlebucketjointest");
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/legacyoperationhandlertest.cpp b/storage/src/tests/persistence/legacyoperationhandlertest.cpp
index ff331d44ecd..40fe3119747 100644
--- a/storage/src/tests/persistence/legacyoperationhandlertest.cpp
+++ b/storage/src/tests/persistence/legacyoperationhandlertest.cpp
@@ -8,12 +8,12 @@
#include <vespa/persistence/spi/test.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
using document::DocumentTypeRepo;
using document::TestDocRepo;
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp
index 3c00a7796ba..120dbd4ce45 100644
--- a/storage/src/tests/persistence/mergehandlertest.cpp
+++ b/storage/src/tests/persistence/mergehandlertest.cpp
@@ -6,14 +6,14 @@
#include <tests/persistence/persistencetestutils.h>
#include <tests/persistence/common/persistenceproviderwrapper.h>
#include <tests/distributor/messagesenderstub.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vespalib/objects/nbostream.h>
#include <cmath>
#include <vespa/log/log.h>
LOG_SETUP(".test.persistence.handler.merge");
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/persistencequeuetest.cpp b/storage/src/tests/persistence/persistencequeuetest.cpp
index a86cfd38cda..77e0ed6b71c 100644
--- a/storage/src/tests/persistence/persistencequeuetest.cpp
+++ b/storage/src/tests/persistence/persistencequeuetest.cpp
@@ -7,11 +7,11 @@
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <tests/persistence/common/filestortestfixture.h>
#include <tests/persistence/filestorage/forwardingmessagesender.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
LOG_SETUP(".persistencequeuetest");
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/persistencetestutils.cpp b/storage/src/tests/persistence/persistencetestutils.cpp
index d8df03602ef..480f236997a 100644
--- a/storage/src/tests/persistence/persistencetestutils.cpp
+++ b/storage/src/tests/persistence/persistencetestutils.cpp
@@ -3,7 +3,7 @@
#include <vespa/document/datatype/documenttype.h>
#include <vespa/storageapi/message/persistence.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/persistence/dummyimpl/dummypersistence.h>
#include <vespa/persistence/spi/test.h>
#include <vespa/document/update/assignvalueupdate.h>
@@ -13,7 +13,7 @@
using document::DocumentType;
using storage::framework::defaultimplementation::AllocationLogic;
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/persistencethread_splittest.cpp b/storage/src/tests/persistence/persistencethread_splittest.cpp
index 50fedee1d0a..b6e02e88540 100644
--- a/storage/src/tests/persistence/persistencethread_splittest.cpp
+++ b/storage/src/tests/persistence/persistencethread_splittest.cpp
@@ -5,10 +5,10 @@
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/persistence/spi/test.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace {
diff --git a/storage/src/tests/persistence/processalltest.cpp b/storage/src/tests/persistence/processalltest.cpp
index 4b300c12dd3..11754d50961 100644
--- a/storage/src/tests/persistence/processalltest.cpp
+++ b/storage/src/tests/persistence/processalltest.cpp
@@ -6,9 +6,9 @@
#include <vespa/storage/persistence/messages.h>
#include <vespa/documentapi/loadtypes/loadtype.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/persistence/testandsettest.cpp b/storage/src/tests/persistence/testandsettest.cpp
index 2332596263b..a19ba26e866 100644
--- a/storage/src/tests/persistence/testandsettest.cpp
+++ b/storage/src/tests/persistence/testandsettest.cpp
@@ -3,7 +3,7 @@
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/storage/persistence/persistencethread.h>
#include <tests/persistence/persistencetestutils.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/documentapi/messagebus/messages/testandsetcondition.h>
#include <vespa/document/fieldvalue/fieldvalues.h>
#include <vespa/document/update/assignvalueupdate.h>
@@ -15,7 +15,7 @@ using std::shared_ptr;
using namespace std::string_literals;
using storage::spi::test::makeBucket;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 44d2dc889ab..5be57155ec9 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -8,11 +8,11 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storageapi/message/persistence.h>
#include <vespa/config/common/exceptions.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
index 53d41051fae..732aff5faf6 100644
--- a/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
+++ b/storage/src/tests/storageserver/changedbucketownershiphandlertest.cpp
@@ -13,10 +13,10 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/storageserver/changedbucketownershiphandler.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/storageserver/communicationmanagertest.cpp b/storage/src/tests/storageserver/communicationmanagertest.cpp
index 4f9a68a69c2..5111368dd1c 100644
--- a/storage/src/tests/storageserver/communicationmanagertest.cpp
+++ b/storage/src/tests/storageserver/communicationmanagertest.cpp
@@ -10,10 +10,10 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/dummystoragelink.h>
#include <tests/common/testhelper.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdstestlib/cppunit/macros.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/storageserver/documentapiconvertertest.cpp b/storage/src/tests/storageserver/documentapiconvertertest.cpp
index 224dc8b9a9b..1744bfb6a79 100644
--- a/storage/src/tests/storageserver/documentapiconvertertest.cpp
+++ b/storage/src/tests/storageserver/documentapiconvertertest.cpp
@@ -13,7 +13,7 @@
#include <vespa/document/bucket/bucketidfactory.h>
#include <vespa/config/subscription/configuri.h>
#include <vespa/vespalib/testkit/test_kit.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
using document::DataType;
using document::DocIdString;
@@ -21,7 +21,7 @@ using document::Document;
using document::DocumentId;
using document::DocumentTypeRepo;
using document::readDocumenttypesConfig;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/storageserver/mergethrottlertest.cpp b/storage/src/tests/storageserver/mergethrottlertest.cpp
index 17503200d10..7d04714e9a8 100644
--- a/storage/src/tests/storageserver/mergethrottlertest.cpp
+++ b/storage/src/tests/storageserver/mergethrottlertest.cpp
@@ -6,7 +6,7 @@
#include <tests/common/storagelinktest.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/storage/storageserver/mergethrottler.h>
#include <vespa/storage/persistence/messages.h>
#include <vespa/storageapi/message/bucket.h>
@@ -22,7 +22,7 @@
using namespace document;
using namespace storage::api;
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
diff --git a/storage/src/tests/visiting/visitormanagertest.cpp b/storage/src/tests/visiting/visitormanagertest.cpp
index 017da4e4904..3c5780cf77c 100644
--- a/storage/src/tests/visiting/visitormanagertest.cpp
+++ b/storage/src/tests/visiting/visitormanagertest.cpp
@@ -12,7 +12,7 @@
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
-#include <tests/common/make_document_bucket.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <tests/storageserver/testvisitormessagesession.h>
#include <vespa/documentapi/messagebus/messages/multioperationmessage.h>
#include <vespa/documentapi/messagebus/messages/putdocumentmessage.h>
@@ -20,7 +20,7 @@
#include <vespa/config/common/exceptions.h>
#include <vespa/vespalib/util/exceptions.h>
-using storage::test::makeDocumentBucket;
+using document::test::makeDocumentBucket;
namespace storage {
namespace {
diff --git a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
index f03c59f0887..bfd657c2f05 100644
--- a/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
+++ b/storageapi/src/tests/mbusprot/storageprotocoltest.cpp
@@ -15,6 +15,7 @@
#include <vespa/document/document.h>
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/update/fieldpathupdates.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vdstestlib/cppunit/macros.h>
#include <vespa/vespalib/util/growablebytebuffer.h>
#include <vespa/vespalib/objects/nbostream.h>
@@ -28,21 +29,13 @@ using document::Document;
using document::DocumentId;
using document::DocumentType;
using document::DocumentTypeRepo;
+using document::test::makeDocumentBucket;
using storage::lib::ClusterState;
using vespalib::string;
namespace storage {
namespace api {
-namespace {
-
-document::Bucket makeDocumentBucket(document::BucketId bucketId)
-{
- return document::Bucket(BucketSpace::placeHolder(), bucketId);
-}
-
-}
-
struct StorageProtocolTest : public CppUnit::TestFixture {
document::TestDocMan _docMan;
document::Document::SP _testDoc;
diff --git a/storageserver/src/tests/storageservertest.cpp b/storageserver/src/tests/storageservertest.cpp
index 66f2c546a42..36d72bdc2b4 100644
--- a/storageserver/src/tests/storageservertest.cpp
+++ b/storageserver/src/tests/storageservertest.cpp
@@ -4,6 +4,7 @@
#include <vespa/storage/storageserver/distributornode.h>
#include <vespa/document/base/testdocman.h>
+#include <vespa/document/test/make_document_bucket.h>
#include <vespa/documentapi/documentapi.h>
#include <vespa/messagebus/rpcmessagebus.h>
#include <vespa/messagebus/network/rpcnetworkparams.h>
@@ -27,6 +28,8 @@
#include <vespa/log/log.h>
LOG_SETUP(".storageservertest");
+using document::test::makeDocumentBucket;
+
namespace storage {
namespace {
@@ -651,10 +654,6 @@ namespace {
return true;
}
- static document::Bucket makeDocumentBucket(document::BucketId bucketId) {
- return document::Bucket(document::BucketSpace::placeHolder(), bucketId);
- }
-
void run() override {
uint32_t seed = 0;
uint32_t maxDocSize = 65536;