diff options
author | Tor Egge <Tor.Egge@broadpark.no> | 2017-10-17 01:19:04 +0200 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2017-10-17 12:02:29 +0000 |
commit | a110f409b9d56fc7542b110cd50956e3fefdb806 (patch) | |
tree | 567d9ad6afdb65c5ffe40dccb55cc1cedab06226 /storage/src/tests/persistence/processalltest.cpp | |
parent | dde45a05b010b6de1c62643cd9ecd37c091fdba9 (diff) |
Take document::Bucket instead of document::BucketId as constructor
argument to storage commands that inherit from BucketCommand.
Diffstat (limited to 'storage/src/tests/persistence/processalltest.cpp')
-rw-r--r-- | storage/src/tests/persistence/processalltest.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/storage/src/tests/persistence/processalltest.cpp b/storage/src/tests/persistence/processalltest.cpp index e38505c2768..4b300c12dd3 100644 --- a/storage/src/tests/persistence/processalltest.cpp +++ b/storage/src/tests/persistence/processalltest.cpp @@ -6,6 +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> + +using storage::test::makeDocumentBucket; namespace storage { @@ -41,7 +44,7 @@ ProcessAllHandlerTest::testRemoveLocation() doPut(4, spi::Timestamp(1234)); doPut(4, spi::Timestamp(2345)); - api::RemoveLocationCommand removeLocation("id.user == 4", bucketId); + api::RemoveLocationCommand removeLocation("id.user == 4", makeDocumentBucket(bucketId)); ProcessAllHandler handler(getEnv(), getPersistenceProvider()); spi::Context context(documentapi::LoadType::DEFAULT, 0, 0); handler.handleRemoveLocation(removeLocation, context); @@ -67,7 +70,7 @@ ProcessAllHandlerTest::testRemoveLocationDocumentSubset() } api::RemoveLocationCommand - removeLocation("testdoctype1.headerval % 2 == 0", bucketId); + removeLocation("testdoctype1.headerval % 2 == 0", makeDocumentBucket(bucketId)); spi::Context context(documentapi::LoadType::DEFAULT, 0, 0); handler.handleRemoveLocation(removeLocation, context); @@ -92,7 +95,7 @@ ProcessAllHandlerTest::testRemoveLocationUnknownDocType() doPut(4, spi::Timestamp(1234)); api::RemoveLocationCommand - removeLocation("unknowndoctype.headerval % 2 == 0", bucketId); + removeLocation("unknowndoctype.headerval % 2 == 0", makeDocumentBucket(bucketId)); bool gotException = false; try { @@ -115,7 +118,7 @@ ProcessAllHandlerTest::testRemoveLocationBogusSelection() document::BucketId bucketId(16, 4); doPut(4, spi::Timestamp(1234)); - api::RemoveLocationCommand removeLocation("id.bogus != badgers", bucketId); + api::RemoveLocationCommand removeLocation("id.bogus != badgers", makeDocumentBucket(bucketId)); bool gotException = false; try { @@ -145,7 +148,7 @@ ProcessAllHandlerTest::testStat() doPut(doc, bucketId, spi::Timestamp(100 + i), 0); } - api::StatBucketCommand statBucket(bucketId, + api::StatBucketCommand statBucket(makeDocumentBucket(bucketId), "testdoctype1.headerval % 2 == 0"); spi::Context context(documentapi::LoadType::DEFAULT, 0, 0); MessageTracker::UP tracker = handler.handleStatBucket(statBucket, context); @@ -184,7 +187,7 @@ ProcessAllHandlerTest::testStatWithRemove() true); } - api::StatBucketCommand statBucket(bucketId, "true"); + api::StatBucketCommand statBucket(makeDocumentBucket(bucketId), "true"); spi::Context context(documentapi::LoadType::DEFAULT, 0, 0); MessageTracker::UP tracker = handler.handleStatBucket(statBucket, context); @@ -233,7 +236,7 @@ ProcessAllHandlerTest::testStatWholeBucket() doPut(doc, bucketId, spi::Timestamp(100 + i), 0); } - api::StatBucketCommand statBucket(bucketId, "true"); + api::StatBucketCommand statBucket(makeDocumentBucket(bucketId), "true"); spi::Context context(documentapi::LoadType::DEFAULT, 0, 0); MessageTracker::UP tracker = handler.handleStatBucket(statBucket, context); |