diff options
author | Tor Egge <Tor.Egge@oath.com> | 2017-10-23 12:41:35 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2017-10-23 12:41:35 +0000 |
commit | ff8f736032fab9e274b88317c8f0119ac62133ef (patch) | |
tree | e19138c63f06b462e182fec39e120517328316bf /storage/src/tests/distributor | |
parent | c2105574acbf1694e83b4b43fa8200fb48eb79b2 (diff) |
Add bucket space to create visitor command.
Diffstat (limited to 'storage/src/tests/distributor')
-rw-r--r-- | storage/src/tests/distributor/distributortest.cpp | 4 | ||||
-rw-r--r-- | storage/src/tests/distributor/idealstatemanagertest.cpp | 2 | ||||
-rw-r--r-- | storage/src/tests/distributor/visitoroperationtest.cpp | 14 |
3 files changed, 13 insertions, 7 deletions
diff --git a/storage/src/tests/distributor/distributortest.cpp b/storage/src/tests/distributor/distributortest.cpp index b830aa6d506..4be9735c0f7 100644 --- a/storage/src/tests/distributor/distributortest.cpp +++ b/storage/src/tests/distributor/distributortest.cpp @@ -10,12 +10,14 @@ #include <vespa/storageframework/defaultimplementation/thread/threadpoolimpl.h> #include <tests/distributor/distributortestutil.h> #include <vespa/document/test/make_document_bucket.h> +#include <vespa/document/test/make_bucket_space.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 document::test::makeDocumentBucket; +using document::test::makeBucketSpace; namespace storage { @@ -209,7 +211,7 @@ Distributor_Test::testOperationGeneration() document::DocumentId("userdoc:m:1:foo"), api::Timestamp(1234)))); - api::CreateVisitorCommand* cmd = new api::CreateVisitorCommand("foo", "bar", ""); + api::CreateVisitorCommand* cmd = new api::CreateVisitorCommand(makeBucketSpace(), "foo", "bar", ""); cmd->addBucketToBeVisited(document::BucketId(16, 1)); cmd->addBucketToBeVisited(document::BucketId()); diff --git a/storage/src/tests/distributor/idealstatemanagertest.cpp b/storage/src/tests/distributor/idealstatemanagertest.cpp index fe7a03856c7..d4d7a00a2df 100644 --- a/storage/src/tests/distributor/idealstatemanagertest.cpp +++ b/storage/src/tests/distributor/idealstatemanagertest.cpp @@ -222,7 +222,7 @@ IdealStateManagerTest::testBlockIdealStateOpsOnFullRequestBucketInfo() // Don't block on null-bucket messages that aren't RequestBucketInfo. { std::shared_ptr<api::CreateVisitorCommand> msg( - new api::CreateVisitorCommand("foo", "bar", "baz")); + new api::CreateVisitorCommand(makeBucketSpace(), "foo", "bar", "baz")); msg->setAddress( api::StorageMessageAddress("storage", lib::NodeType::STORAGE, 7)); tracker.insert(msg); diff --git a/storage/src/tests/distributor/visitoroperationtest.cpp b/storage/src/tests/distributor/visitoroperationtest.cpp index c8f339f6626..f12e1fa4e33 100644 --- a/storage/src/tests/distributor/visitoroperationtest.cpp +++ b/storage/src/tests/distributor/visitoroperationtest.cpp @@ -13,11 +13,13 @@ #include <vespa/storage/distributor/distributor.h> #include <tests/common/dummystoragelink.h> #include <vespa/vdstestlib/cppunit/macros.h> +#include <vespa/document/test/make_bucket_space.h> using namespace document; using namespace storage::api; using namespace storage::lib; using namespace std::string_literals; +using document::test::makeBucketSpace; namespace storage { namespace distributor { @@ -148,7 +150,7 @@ private: const std::string& docSelection = "") { api::CreateVisitorCommand::SP cmd( - new api::CreateVisitorCommand(libraryName, instanceId, docSelection)); + new api::CreateVisitorCommand(makeBucketSpace(), libraryName, instanceId, docSelection)); cmd->setControlDestination("controldestination"); cmd->setDataDestination("datadestination"); cmd->setFieldSet("[header]"); @@ -265,7 +267,8 @@ VisitorOperationTest::doStandardVisitTest(const std::string& clusterState) vespalib::string libraryName("dumpvisitor"); vespalib::string docSelection(""); api::CreateVisitorCommand::SP msg( - new api::CreateVisitorCommand(libraryName, + new api::CreateVisitorCommand(makeBucketSpace(), + libraryName, instanceId, docSelection)); vespalib::string controlDestination("controldestination"); @@ -333,7 +336,8 @@ VisitorOperationTest::testShutdown() vespalib::string libraryName("dumpvisitor"); vespalib::string docSelection(""); api::CreateVisitorCommand::SP msg( - new api::CreateVisitorCommand(libraryName, + new api::CreateVisitorCommand(makeBucketSpace(), + libraryName, instanceId, docSelection)); msg->addBucketToBeVisited(id); @@ -361,7 +365,7 @@ VisitorOperationTest::testNoBucket() // Send create visitor api::CreateVisitorCommand::SP msg(new api::CreateVisitorCommand( - "dumpvisitor", "instance", "")); + makeBucketSpace(), "dumpvisitor", "instance", "")); CPPUNIT_ASSERT_EQUAL(std::string( "CreateVisitorReply(last=BucketId(0x0000000000000000)) " @@ -377,7 +381,7 @@ VisitorOperationTest::testOnlySuperBucketAndProgressAllowed() // Send create visitor api::CreateVisitorCommand::SP msg(new api::CreateVisitorCommand( - "dumpvisitor", "instance", "")); + makeBucketSpace(), "dumpvisitor", "instance", "")); msg->addBucketToBeVisited(nullId); msg->addBucketToBeVisited(nullId); msg->addBucketToBeVisited(nullId); |