summaryrefslogtreecommitdiffstats
path: root/storage/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/tests')
-rw-r--r--storage/src/tests/common/testhelper.cpp2
-rw-r--r--storage/src/tests/distributor/splitbuckettest.cpp3
-rw-r--r--storage/src/tests/persistence/filestorage/filestormanagertest.cpp13
-rw-r--r--storage/src/tests/persistence/mergehandlertest.cpp3
-rw-r--r--storage/src/tests/storageserver/statereportertest.cpp3
5 files changed, 14 insertions, 10 deletions
diff --git a/storage/src/tests/common/testhelper.cpp b/storage/src/tests/common/testhelper.cpp
index f7da854be68..e2c74dab5b4 100644
--- a/storage/src/tests/common/testhelper.cpp
+++ b/storage/src/tests/common/testhelper.cpp
@@ -106,7 +106,7 @@ vdstestlib::DirConfig getStandardConfig(bool storagenode, const std::string & ro
// Easier to see what goes wrong with only 1 thread per disk.
config->set("minimum_file_meta_slots", "2");
config->set("minimum_file_header_block_size", "368");
- config->set("minimum_file_size", "4096");
+ config->set("minimum_file_size", "4_Ki");
config->set("num_threads", "1");
config->set("dir_spread", "4");
config->set("dir_levels", "0");
diff --git a/storage/src/tests/distributor/splitbuckettest.cpp b/storage/src/tests/distributor/splitbuckettest.cpp
index 527fc7bfa2a..8c8da1bb197 100644
--- a/storage/src/tests/distributor/splitbuckettest.cpp
+++ b/storage/src/tests/distributor/splitbuckettest.cpp
@@ -9,6 +9,7 @@
#include <vespa/storageapi/message/persistence.h>
#include <tests/common/dummystoragelink.h>
#include <tests/distributor/distributortestutil.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/gtest/gtest.h>
#include "dummy_cluster_context.h"
@@ -39,7 +40,7 @@ struct SplitOperationTest : Test, DistributorTestUtil {
};
SplitOperationTest::SplitOperationTest()
- : splitByteSize(10*1024*1024),
+ : splitByteSize(10_Mi),
tooLargeBucketSize(splitByteSize * 1.1),
splitCount(UINT32_MAX),
maxSplitBits(58)
diff --git a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
index acccbb8b9b9..8e4671fc78b 100644
--- a/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
+++ b/storage/src/tests/persistence/filestorage/filestormanagertest.cpp
@@ -26,6 +26,7 @@
#include <vespa/vdslib/state/random.h>
#include <vespa/vespalib/gtest/gtest.h>
#include <vespa/vespalib/util/gate.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <atomic>
#include <thread>
@@ -593,7 +594,7 @@ TEST_F(FileStorManagerTest, handler_paused_multi_thread) {
Document::SP doc(createDocument(content, "id:footype:testdoctype1:n=1234:bar").release());
- FastOS_ThreadPool pool(512 * 1024);
+ FastOS_ThreadPool pool(512_Ki);
MessagePusherThread pushthread(filestorHandler, doc);
pushthread.start(pool);
@@ -1277,7 +1278,7 @@ TEST_F(FileStorManagerTest, visiting) {
// Visit bucket with no split, using no selection
{
spi::IteratorId iterId(createIterator(top, ids[0], "true"));
- auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[0]), iterId, 16*1024);
+ auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[0]), iterId, 16_Ki);
top.sendDown(cmd);
top.waitForMessages(1, _waitTime);
ASSERT_EQ(1, top.getNumReplies());
@@ -1293,7 +1294,7 @@ TEST_F(FileStorManagerTest, visiting) {
uint32_t totalDocs = 0;
spi::IteratorId iterId(createIterator(top, ids[1], "testdoctype1.hstringval = \"John Doe\""));
while (true) {
- auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[1]), iterId, 16*1024);
+ auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[1]), iterId, 16_Ki);
top.sendDown(cmd);
top.waitForMessages(1, _waitTime);
ASSERT_EQ(1, top.getNumReplies());
@@ -1320,7 +1321,7 @@ TEST_F(FileStorManagerTest, visiting) {
framework::MicroSecTime(40)));
uint32_t totalDocs = 0;
while (true) {
- auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[1]), iterId, 16*1024);
+ auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(ids[1]), iterId, 16_Ki);
top.sendDown(cmd);
top.waitForMessages(1, _waitTime);
ASSERT_EQ(1, top.getNumReplies());
@@ -1631,7 +1632,7 @@ TEST_F(FileStorManagerTest, get_iter) {
// Sending a getiter request that will only visit some of the docs
spi::IteratorId iterId(createIterator(top, bid, ""));
{
- auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(bid), iterId, 2048);
+ auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(bid), iterId, 2_Ki);
top.sendDown(cmd);
top.waitForMessages(1, _waitTime);
ASSERT_EQ(1, top.getNumReplies());
@@ -1656,7 +1657,7 @@ TEST_F(FileStorManagerTest, get_iter) {
EXPECT_EQ(ReturnCode(ReturnCode::OK), reply->getResult());
}
{
- auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(bid), iterId, 2048);
+ auto cmd = std::make_shared<GetIterCommand>(makeDocumentBucket(bid), iterId, 2_Ki);
top.sendDown(cmd);
top.waitForMessages(1, _waitTime);
ASSERT_EQ(1, top.getNumReplies());
diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp
index 7e810c0fff4..45d431890f5 100644
--- a/storage/src/tests/persistence/mergehandlertest.cpp
+++ b/storage/src/tests/persistence/mergehandlertest.cpp
@@ -8,6 +8,7 @@
#include <tests/common/message_sender_stub.h>
#include <vespa/document/test/make_document_bucket.h>
#include <vespa/vespalib/objects/nbostream.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <gmock/gmock.h>
#include <cmath>
@@ -626,7 +627,7 @@ MergeHandlerTest::createDummyGetBucketDiff(int timestampOffset, uint16_t hasMask
diff.push_back(e);
}
- auto getBucketDiffCmd = std::make_shared<api::GetBucketDiffCommand>(_bucket, _nodes, 1024*1024);
+ auto getBucketDiffCmd = std::make_shared<api::GetBucketDiffCommand>(_bucket, _nodes, 1_Mi);
getBucketDiffCmd->getDiff() = diff;
return getBucketDiffCmd;
}
diff --git a/storage/src/tests/storageserver/statereportertest.cpp b/storage/src/tests/storageserver/statereportertest.cpp
index 121195ba033..15b5a912ed5 100644
--- a/storage/src/tests/storageserver/statereportertest.cpp
+++ b/storage/src/tests/storageserver/statereportertest.cpp
@@ -13,6 +13,7 @@
#include <vespa/vespalib/data/slime/slime.h>
#include <vespa/vespalib/data/simple_buffer.h>
#include <vespa/vespalib/gtest/gtest.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <thread>
#include <vespa/log/log.h>
@@ -60,7 +61,7 @@ struct MetricClock : public metrics::MetricManager::Timer
}
StateReporterTest::StateReporterTest()
- : _threadPool(256*1024),
+ : _threadPool(256_Ki),
_clock(nullptr),
_top(),
_stateReporter()