summaryrefslogtreecommitdiffstats
path: root/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@oath.com>2017-10-04 11:37:21 +0000
committerTor Egge <Tor.Egge@oath.com>2017-10-04 14:20:19 +0000
commit3f419f70b9ae6dffbb07c3f042a8482dc413c278 (patch)
tree0bfa00c37d2b0a00a3815536e3dc1f351e27d70b /memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
parent80d54b0d844c964b0ce1cf42cce3f0373ef327a4 (diff)
Use document::Bucket in storage::spi::Bucket to add bucket space.
Diffstat (limited to 'memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp')
-rw-r--r--memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp32
1 files changed, 17 insertions, 15 deletions
diff --git a/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp b/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
index ce11667f75f..07c2bab5bae 100644
--- a/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
+++ b/memfilepersistence/src/tests/spi/joinoperationhandlertest.cpp
@@ -2,8 +2,10 @@
#include "memfiletestutils.h"
#include <vespa/document/datatype/documenttype.h>
+#include <vespa/persistence/spi/test.h>
using document::DocumentType;
+using storage::spi::test::makeBucket;
namespace storage {
namespace memfile {
@@ -138,9 +140,9 @@ JoinOperationHandlerTest::doJoin(const document::BucketId to,
spi::Context context(defaultLoadType, spi::Priority(0),
spi::Trace::TraceLevel(0));
return getPersistenceProvider().join(
- spi::Bucket(from1, spi::PartitionId(0)),
- spi::Bucket(from2, spi::PartitionId(0)),
- spi::Bucket(to, spi::PartitionId(0)),
+ makeBucket(from1),
+ makeBucket(from2),
+ makeBucket(to),
context);
}
@@ -250,9 +252,9 @@ JoinOperationHandlerTest::testMultiDisk()
setupDisks(10);
feedMultiDisk();
- getPersistenceProvider().join(spi::Bucket(SOURCE2, spi::PartitionId(7)),
- spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(TARGET, spi::PartitionId(3)),
+ getPersistenceProvider().join(makeBucket(SOURCE2, spi::PartitionId(7)),
+ makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(TARGET, spi::PartitionId(3)),
context);
CPPUNIT_ASSERT_EQUAL(
@@ -276,9 +278,9 @@ JoinOperationHandlerTest::testMultiDiskFlushed()
env()._cache.flushDirtyEntries();
env()._cache.clear();
- getPersistenceProvider().join(spi::Bucket(SOURCE2, spi::PartitionId(7)),
- spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(TARGET, spi::PartitionId(3)),
+ getPersistenceProvider().join(makeBucket(SOURCE2, spi::PartitionId(7)),
+ makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(TARGET, spi::PartitionId(3)),
context);
CPPUNIT_ASSERT_EQUAL(
@@ -322,9 +324,9 @@ JoinOperationHandlerTest::testInternalJoin()
mon->overrideRealStat(512, 100000, 50000);
CPPUNIT_ASSERT(!mon->isFull(0, .80f));
- getPersistenceProvider().join(spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(SOURCE1, spi::PartitionId(5)),
+ getPersistenceProvider().join(makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(SOURCE1, spi::PartitionId(5)),
context);
env()._cache.clear();
@@ -368,9 +370,9 @@ JoinOperationHandlerTest::testInternalJoinDiskFull()
CPPUNIT_ASSERT(mon->isFull(0, .08f));
spi::Result result =
- getPersistenceProvider().join(spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(SOURCE1, spi::PartitionId(4)),
- spi::Bucket(SOURCE1, spi::PartitionId(5)),
+ getPersistenceProvider().join(makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(SOURCE1, spi::PartitionId(4)),
+ makeBucket(SOURCE1, spi::PartitionId(5)),
context);
CPPUNIT_ASSERT(result.hasError());