summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/index
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-02-15 13:55:04 +0000
committerArne Juul <arnej@verizonmedia.com>2021-02-15 14:16:21 +0000
commitaf9d59c3fece374c5fe61575c67ad49ac5f84bb4 (patch)
treea1851a855e22e406f877bfb405e192232ec1e137 /searchcore/src/tests/proton/index
parent805a313df05d2f347af321511527e06ea3cae92c (diff)
use size literals in searchcore
Diffstat (limited to 'searchcore/src/tests/proton/index')
-rw-r--r--searchcore/src/tests/proton/index/indexcollection_test.cpp3
-rw-r--r--searchcore/src/tests/proton/index/indexmanager_test.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/index/indexcollection_test.cpp b/searchcore/src/tests/proton/index/indexcollection_test.cpp
index 113901e893f..a0007027d51 100644
--- a/searchcore/src/tests/proton/index/indexcollection_test.cpp
+++ b/searchcore/src/tests/proton/index/indexcollection_test.cpp
@@ -3,6 +3,7 @@
#include <vespa/searchcore/proton/matching/fakesearchcontext.h>
#include <vespa/searchcorespi/index/warmupindexcollection.h>
#include <vespa/vespalib/gtest/gtest.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/log/log.h>
@@ -87,7 +88,7 @@ public:
_source1(new MockIndexSearchable({3, 5})),
_source2(new MockIndexSearchable({7, 11})),
_fusion_source(new FakeIndexSearchable),
- _executor(1, 128*1024),
+ _executor(1, 128_Ki),
_warmup(new FakeIndexSearchable)
{}
~IndexCollectionTest() = default;
diff --git a/searchcore/src/tests/proton/index/indexmanager_test.cpp b/searchcore/src/tests/proton/index/indexmanager_test.cpp
index bb808879e80..a4e9b828870 100644
--- a/searchcore/src/tests/proton/index/indexmanager_test.cpp
+++ b/searchcore/src/tests/proton/index/indexmanager_test.cpp
@@ -20,6 +20,7 @@
#include <vespa/searchlib/test/index/mock_field_length_inspector.h>
#include <vespa/vespalib/gtest/gtest.h>
#include <vespa/vespalib/io/fileutil.h>
+#include <vespa/vespalib/util/size_literals.h>
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <vespa/vespalib/util/time.h>
#include <set>
@@ -316,7 +317,7 @@ TEST_F(IndexManagerTest, require_that_memory_index_is_flushed)
TEST_F(IndexManagerTest, require_that_large_memory_footprint_triggers_urgent_flush) {
using FlushStats = IndexMaintainer::FlushStats;
- constexpr size_t G = 1024*1024*1024l;
+ constexpr size_t G =1_Gi;
// IndexMaintainer::FlushStats small_15G(15*G, 0, 1, 1);
EXPECT_FALSE(IndexFlushTarget(_index_manager->getMaintainer()).needUrgentFlush());
EXPECT_FALSE(IndexFlushTarget(_index_manager->getMaintainer(), FlushStats(15*G)).needUrgentFlush());