summaryrefslogtreecommitdiffstats
path: root/storage/src/tests/bucketdb/bucketmanagertest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/tests/bucketdb/bucketmanagertest.cpp')
-rw-r--r--storage/src/tests/bucketdb/bucketmanagertest.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/storage/src/tests/bucketdb/bucketmanagertest.cpp b/storage/src/tests/bucketdb/bucketmanagertest.cpp
index 98f3e06fc62..8cc046861be 100644
--- a/storage/src/tests/bucketdb/bucketmanagertest.cpp
+++ b/storage/src/tests/bucketdb/bucketmanagertest.cpp
@@ -15,6 +15,7 @@
#include <tests/common/dummystoragelink.h>
#include <tests/common/testhelper.h>
#include <vespa/document/test/make_document_bucket.h>
+#include <vespa/document/test/make_bucket_space.h>
#include <vespa/vdslib/state/random.h>
#include <vespa/vespalib/io/fileutil.h>
#include <vespa/vespalib/testkit/testapp.h>
@@ -31,6 +32,7 @@ using config::FileSpec;
using document::DocumentType;
using document::DocumentTypeRepo;
using document::test::makeDocumentBucket;
+using document::test::makeBucketSpace;
namespace storage {
@@ -415,13 +417,13 @@ void BucketManagerTest::testRequestBucketInfoWithState()
// Send a request bucket info command that will be outdated and failed.
std::shared_ptr<api::RequestBucketInfoCommand> cmd1(
- new api::RequestBucketInfoCommand(0, states[1]));
+ new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[1]));
// Send two request bucket info commands that will be processed together
// when the bucket manager is idle, as states are equivalent
std::shared_ptr<api::RequestBucketInfoCommand> cmd2(
- new api::RequestBucketInfoCommand(0, states[2]));
+ new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[2]));
std::shared_ptr<api::RequestBucketInfoCommand> cmd3(
- new api::RequestBucketInfoCommand(0, states[3]));
+ new api::RequestBucketInfoCommand(makeBucketSpace(), 0, states[3]));
// Tag server initialized before starting
_top->open();
@@ -559,7 +561,7 @@ void BucketManagerTest::testRequestBucketInfoWithList()
bids.push_back(document::BucketId(16, 0xe8c8));
std::shared_ptr<api::RequestBucketInfoCommand> cmd(
- new api::RequestBucketInfoCommand(bids));
+ new api::RequestBucketInfoCommand(makeBucketSpace(), bids));
_top->sendDown(cmd);
_top->waitForMessages(1, 5);
@@ -729,11 +731,11 @@ public:
}
auto createFullFetchCommand() const {
- return std::make_shared<api::RequestBucketInfoCommand>(0, _state);
+ return std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), 0, _state);
}
auto createFullFetchCommandWithHash(vespalib::stringref hash) const {
- return std::make_shared<api::RequestBucketInfoCommand>(0, _state, hash);
+ return std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), 0, _state, hash);
}
auto acquireBucketLockAndSendInfoRequest(const document::BucketId& bucket) {
@@ -907,7 +909,7 @@ BucketManagerTest::testOrderRepliesAfterBucketSpecificRequest()
auto infoRoundtrip = std::async(std::launch::async, [&]() {
std::vector<document::BucketId> buckets{bucketA};
- auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets);
+ auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets);
// Can't complete until `guard` has been unlocked.
_top->sendDown(infoCmd);
// Barrier: bucket reply and subsequent split reply
@@ -947,7 +949,7 @@ BucketManagerTest::testQueuedRepliesOnlyDispatchedWhenAllProcessingDone()
auto singleBucketInfo = std::async(std::launch::async, [&]() {
std::vector<document::BucketId> buckets{bucketA};
- auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets);
+ auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets);
_top->sendDown(infoCmd);
_top->waitForMessages(3, MESSAGE_WAIT_TIME);
});
@@ -1209,7 +1211,7 @@ void
BucketManagerTest::sendSingleBucketInfoRequest(const document::BucketId& id)
{
std::vector<document::BucketId> buckets{id};
- auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(buckets);
+ auto infoCmd = std::make_shared<api::RequestBucketInfoCommand>(makeBucketSpace(), buckets);
_top->sendDown(infoCmd);
}