aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/storageserver/bouncertest.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2017-10-17 01:19:04 +0200
committerTor Egge <Tor.Egge@oath.com>2017-10-17 12:02:29 +0000
commita110f409b9d56fc7542b110cd50956e3fefdb806 (patch)
tree567d9ad6afdb65c5ffe40dccb55cc1cedab06226 /storage/src/tests/storageserver/bouncertest.cpp
parentdde45a05b010b6de1c62643cd9ecd37c091fdba9 (diff)
Take document::Bucket instead of document::BucketId as constructor
argument to storage commands that inherit from BucketCommand.
Diffstat (limited to 'storage/src/tests/storageserver/bouncertest.cpp')
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 7a668971857..44d2dc889ab 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -8,9 +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/storageapi/message/persistence.h>
#include <vespa/config/common/exceptions.h>
+using storage::test::makeDocumentBucket;
namespace storage {
@@ -110,7 +112,7 @@ BouncerTest::createDummyFeedMessage(api::Timestamp timestamp,
api::StorageMessage::Priority priority)
{
auto cmd = std::make_shared<api::RemoveCommand>(
- document::BucketId(0),
+ makeDocumentBucket(document::BucketId(0)),
document::DocumentId("doc:foo:bar"),
timestamp);
cmd->setPriority(priority);
@@ -165,7 +167,7 @@ BouncerTest::testAllowNotifyBucketChangeEvenWhenDistributorDown()
document::BucketId bucket(16, 1234);
api::BucketInfo info(0x1, 0x2, 0x3);
- auto cmd = std::make_shared<api::NotifyBucketChangeCommand>(bucket, info);
+ auto cmd = std::make_shared<api::NotifyBucketChangeCommand>(makeDocumentBucket(bucket), info);
_upper->sendDown(cmd);
CPPUNIT_ASSERT_EQUAL(size_t(0), _upper->getNumReplies());
@@ -246,7 +248,7 @@ BouncerTest::readOnlyOperationsAreNotRejected()
// StatBucket is an external operation, but it's not a mutating operation
// and should therefore not be blocked.
auto cmd = std::make_shared<api::StatBucketCommand>(
- document::BucketId(16, 5), "");
+ makeDocumentBucket(document::BucketId(16, 5)), "");
cmd->setPriority(Priority(2));
_upper->sendDown(cmd);
assertMessageNotBounced();
@@ -258,7 +260,7 @@ BouncerTest::internalOperationsAreNotRejected()
configureRejectionThreshold(Priority(1));
document::BucketId bucket(16, 1234);
api::BucketInfo info(0x1, 0x2, 0x3);
- auto cmd = std::make_shared<api::NotifyBucketChangeCommand>(bucket, info);
+ auto cmd = std::make_shared<api::NotifyBucketChangeCommand>(makeDocumentBucket(bucket), info);
cmd->setPriority(Priority(2));
_upper->sendDown(cmd);
assertMessageNotBounced();