summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-03-14 21:59:58 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-03-14 21:59:58 +0100
commit8c7fdef8d73897efad7585729e8d2e221a5fc2ce (patch)
tree61a6ae09d4222da730f8d2224183b66287f41159 /storage
parentf4e8f3496ef1edcf39ca64e75e93ce8359983a6c (diff)
Adjust types in storage module.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/bucketdatabasetest.cpp2
-rw-r--r--storage/src/tests/distributor/bucketgctimecalculatortest.cpp2
-rw-r--r--storage/src/tests/distributor/updateoperationtest.cpp6
-rw-r--r--storage/src/tests/persistence/mergehandlertest.cpp20
-rw-r--r--storage/src/tests/visiting/visitortest.cpp6
-rw-r--r--storage/src/vespa/storage/distributor/distributor_host_info_reporter.cpp4
6 files changed, 20 insertions, 20 deletions
diff --git a/storage/src/tests/distributor/bucketdatabasetest.cpp b/storage/src/tests/distributor/bucketdatabasetest.cpp
index c269389dd04..55106ce5c28 100644
--- a/storage/src/tests/distributor/bucketdatabasetest.cpp
+++ b/storage/src/tests/distributor/bucketdatabasetest.cpp
@@ -31,7 +31,7 @@ BucketDatabaseTest::testClear() {
db().update(BucketDatabase::Entry(document::BucketId(16, 16), BI(1)));
db().update(BucketDatabase::Entry(document::BucketId(16, 11), BI(2)));
db().clear();
- CPPUNIT_ASSERT_EQUAL(size_t(0), db().size());
+ CPPUNIT_ASSERT_EQUAL(uint64_t(0), db().size());
}
void
diff --git a/storage/src/tests/distributor/bucketgctimecalculatortest.cpp b/storage/src/tests/distributor/bucketgctimecalculatortest.cpp
index e8493a77635..2d2c2e48e1a 100644
--- a/storage/src/tests/distributor/bucketgctimecalculatortest.cpp
+++ b/storage/src/tests/distributor/bucketgctimecalculatortest.cpp
@@ -105,7 +105,7 @@ BucketGcTimeCalculatorTest::identityHasherReturnsBucketId()
BucketGcTimeCalculator::BucketIdIdentityHasher hasher2;
document::BucketId bucket(36, 1234);
- CPPUNIT_ASSERT_EQUAL(bucket.getId(), hasher2.hash(bucket));
+ CPPUNIT_ASSERT_EQUAL(bucket.getId(), static_cast<uint64_t>(hasher2.hash(bucket)));
}
} // distributor
diff --git a/storage/src/tests/distributor/updateoperationtest.cpp b/storage/src/tests/distributor/updateoperationtest.cpp
index 63e2f4f00c1..67cd4f5f233 100644
--- a/storage/src/tests/distributor/updateoperationtest.cpp
+++ b/storage/src/tests/distributor/updateoperationtest.cpp
@@ -125,7 +125,7 @@ UpdateOperation_Test::testSimple()
sender.getLastReply(true));
auto& metrics = getDistributor().getMetrics().updates[documentapi::LoadType::DEFAULT];
- CPPUNIT_ASSERT_EQUAL(0UL, metrics.diverging_timestamp_updates.getValue());
+ CPPUNIT_ASSERT_EQUAL(UINT64_C(0), metrics.diverging_timestamp_updates.getValue());
}
void
@@ -173,7 +173,7 @@ UpdateOperation_Test::testMultiNode()
dumpBucket(_bId));
auto& metrics = getDistributor().getMetrics().updates[documentapi::LoadType::DEFAULT];
- CPPUNIT_ASSERT_EQUAL(0UL, metrics.diverging_timestamp_updates.getValue());
+ CPPUNIT_ASSERT_EQUAL(UINT64_C(0), metrics.diverging_timestamp_updates.getValue());
}
void
@@ -196,6 +196,6 @@ UpdateOperation_Test::testMultiNodeInconsistentTimestamp()
sender.getLastReply(true));
auto& metrics = getDistributor().getMetrics().updates[documentapi::LoadType::DEFAULT];
- CPPUNIT_ASSERT_EQUAL(1UL, metrics.diverging_timestamp_updates.getValue());
+ CPPUNIT_ASSERT_EQUAL(UINT64_C(1), metrics.diverging_timestamp_updates.getValue());
}
diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp
index 5f1f1ebe362..4378814d27b 100644
--- a/storage/src/tests/persistence/mergehandlertest.cpp
+++ b/storage/src/tests/persistence/mergehandlertest.cpp
@@ -272,14 +272,14 @@ MergeHandlerTest::testMergeBucketCommand()
MessageTracker::UP tracker = handler.handleMergeBucket(cmd, *_context);
LOG(info, "Check state");
- CPPUNIT_ASSERT_EQUAL(uint64_t(1), messageKeeper()._msgs.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), messageKeeper()._msgs.size());
CPPUNIT_ASSERT_EQUAL(api::MessageType::GETBUCKETDIFF,
messageKeeper()._msgs[0]->getType());
api::GetBucketDiffCommand& cmd2(dynamic_cast<api::GetBucketDiffCommand&>(
*messageKeeper()._msgs[0]));
CPPUNIT_ASSERT_EQUAL(_nodes, cmd2.getNodes());
std::vector<api::GetBucketDiffCommand::Entry> diff(cmd2.getDiff());
- CPPUNIT_ASSERT_EQUAL(uint64_t(17), diff.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(17), diff.size());
CPPUNIT_ASSERT_EQUAL(uint16_t(1), cmd2.getAddress()->getIndex());
CPPUNIT_ASSERT_EQUAL(uint16_t(1234), cmd2.getSourceIndex());
@@ -300,7 +300,7 @@ MergeHandlerTest::testGetBucketDiffChain(bool midChain)
if (midChain) {
LOG(info, "Check state");
- CPPUNIT_ASSERT_EQUAL(uint64_t(1), messageKeeper()._msgs.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), messageKeeper()._msgs.size());
CPPUNIT_ASSERT_EQUAL(api::MessageType::GETBUCKETDIFF,
messageKeeper()._msgs[0]->getType());
api::GetBucketDiffCommand& cmd2(
@@ -308,7 +308,7 @@ MergeHandlerTest::testGetBucketDiffChain(bool midChain)
*messageKeeper()._msgs[0]));
CPPUNIT_ASSERT_EQUAL(_nodes, cmd2.getNodes());
std::vector<api::GetBucketDiffCommand::Entry> diff(cmd2.getDiff());
- CPPUNIT_ASSERT_EQUAL(uint64_t(17), diff.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(17), diff.size());
CPPUNIT_ASSERT_EQUAL(uint16_t(1), cmd2.getAddress()->getIndex());
LOG(info, "Verifying that replying the diff sends on back");
@@ -328,7 +328,7 @@ MergeHandlerTest::testGetBucketDiffChain(bool midChain)
CPPUNIT_ASSERT_EQUAL(_nodes, reply2->getNodes());
std::vector<api::GetBucketDiffCommand::Entry> diff(reply2->getDiff());
- CPPUNIT_ASSERT_EQUAL(uint64_t(17), diff.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(17), diff.size());
}
void
@@ -344,7 +344,7 @@ MergeHandlerTest::testApplyBucketDiffChain(bool midChain)
if (midChain) {
LOG(info, "Check state");
- CPPUNIT_ASSERT_EQUAL(uint64_t(1), messageKeeper()._msgs.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), messageKeeper()._msgs.size());
CPPUNIT_ASSERT_EQUAL(api::MessageType::APPLYBUCKETDIFF,
messageKeeper()._msgs[0]->getType());
api::ApplyBucketDiffCommand& cmd2(
@@ -352,7 +352,7 @@ MergeHandlerTest::testApplyBucketDiffChain(bool midChain)
*messageKeeper()._msgs[0]));
CPPUNIT_ASSERT_EQUAL(_nodes, cmd2.getNodes());
std::vector<api::ApplyBucketDiffCommand::Entry> diff(cmd2.getDiff());
- CPPUNIT_ASSERT_EQUAL(uint64_t(0), diff.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), diff.size());
CPPUNIT_ASSERT_EQUAL(uint16_t(1), cmd2.getAddress()->getIndex());
CPPUNIT_ASSERT(!replySent.get());
@@ -373,7 +373,7 @@ MergeHandlerTest::testApplyBucketDiffChain(bool midChain)
CPPUNIT_ASSERT_EQUAL(_nodes, reply2->getNodes());
std::vector<api::ApplyBucketDiffCommand::Entry> diff(reply2->getDiff());
- CPPUNIT_ASSERT_EQUAL(uint64_t(0), diff.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(0), diff.size());
}
void
@@ -386,7 +386,7 @@ MergeHandlerTest::testMasterMessageFlow()
handler.handleMergeBucket(cmd, *_context);
LOG(info, "Check state");
- CPPUNIT_ASSERT_EQUAL(uint64_t(1), messageKeeper()._msgs.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(1), messageKeeper()._msgs.size());
CPPUNIT_ASSERT_EQUAL(api::MessageType::GETBUCKETDIFF,
messageKeeper()._msgs[0]->getType());
api::GetBucketDiffCommand& cmd2(dynamic_cast<api::GetBucketDiffCommand&>(
@@ -400,7 +400,7 @@ MergeHandlerTest::testMasterMessageFlow()
handler.handleGetBucketDiffReply(*reply, messageKeeper());
LOG(info, "Check state");
- CPPUNIT_ASSERT_EQUAL(uint64_t(2), messageKeeper()._msgs.size());
+ CPPUNIT_ASSERT_EQUAL(size_t(2), messageKeeper()._msgs.size());
CPPUNIT_ASSERT_EQUAL(api::MessageType::APPLYBUCKETDIFF,
messageKeeper()._msgs[1]->getType());
api::ApplyBucketDiffCommand& cmd3(
diff --git a/storage/src/tests/visiting/visitortest.cpp b/storage/src/tests/visiting/visitortest.cpp
index 51ce1c11e55..24b04c8d33a 100644
--- a/storage/src/tests/visiting/visitortest.cpp
+++ b/storage/src/tests/visiting/visitortest.cpp
@@ -540,7 +540,7 @@ VisitorTest::testNormalUsage()
verifyCreateVisitorReply(api::ReturnCode::OK);
CPPUNIT_ASSERT(waitUntilNoActiveVisitors());
- CPPUNIT_ASSERT_EQUAL(0L, getFailedVisitorDestinationReplyCount());
+ CPPUNIT_ASSERT_EQUAL(INT64_C(0), getFailedVisitorDestinationReplyCount());
}
void
@@ -668,7 +668,7 @@ VisitorTest::testNoDocumentAPIResendingForFailedVisitor()
verifyCreateVisitorReply(api::ReturnCode::NOT_CONNECTED);
CPPUNIT_ASSERT(waitUntilNoActiveVisitors());
- CPPUNIT_ASSERT_EQUAL(3L, getFailedVisitorDestinationReplyCount());
+ CPPUNIT_ASSERT_EQUAL(INT64_C(3), getFailedVisitorDestinationReplyCount());
}
void
@@ -742,7 +742,7 @@ VisitorTest::testFailedDocumentAPISend()
CPPUNIT_ASSERT(waitUntilNoActiveVisitors());
// We currently don't count failures to send in this metric; send failures
// indicate a message bus problem and already log a warning when they happen
- CPPUNIT_ASSERT_EQUAL(0L, getFailedVisitorDestinationReplyCount());
+ CPPUNIT_ASSERT_EQUAL(INT64_C(0), getFailedVisitorDestinationReplyCount());
}
void
diff --git a/storage/src/vespa/storage/distributor/distributor_host_info_reporter.cpp b/storage/src/vespa/storage/distributor/distributor_host_info_reporter.cpp
index 3a588179eb9..bf7468d4c7f 100644
--- a/storage/src/vespa/storage/distributor/distributor_host_info_reporter.cpp
+++ b/storage/src/vespa/storage/distributor/distributor_host_info_reporter.cpp
@@ -38,8 +38,8 @@ writeBucketSpacesStats(vespalib::JsonStream& stream,
stream << Object() << "name" << elem.first;
if (elem.second.valid()) {
stream << "buckets" << Object()
- << "total" << elem.second.bucketsTotal()
- << "pending" << elem.second.bucketsPending()
+ << "total" << static_cast<uint64_t>(elem.second.bucketsTotal())
+ << "pending" << static_cast<uint64_t>(elem.second.bucketsPending())
<< End();
}
stream << End();