diff options
Diffstat (limited to 'storage')
-rw-r--r-- | storage/CMakeLists.txt | 2 | ||||
-rw-r--r-- | storage/src/tests/distributor/bucketdatabasetest.cpp | 2 | ||||
-rw-r--r-- | storage/src/tests/distributor/bucketgctimecalculatortest.cpp | 2 | ||||
-rw-r--r-- | storage/src/tests/distributor/updateoperationtest.cpp | 6 | ||||
-rw-r--r-- | storage/src/tests/frameworkimpl/status/statustest.cpp | 3 | ||||
-rw-r--r-- | storage/src/tests/persistence/mergehandlertest.cpp | 20 | ||||
-rw-r--r-- | storage/src/tests/visiting/visitortest.cpp | 6 |
7 files changed, 22 insertions, 19 deletions
diff --git a/storage/CMakeLists.txt b/storage/CMakeLists.txt index 269785d629e..f77c11eb350 100644 --- a/storage/CMakeLists.txt +++ b/storage/CMakeLists.txt @@ -19,7 +19,7 @@ vespa_define_module( EXTERNAL_DEPENDS Judy - rt + ${VESPA_GLIBC_RT_LIB} LIBS src/vespa/storage 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/frameworkimpl/status/statustest.cpp b/storage/src/tests/frameworkimpl/status/statustest.cpp index b047a4000cf..a9ffe188c69 100644 --- a/storage/src/tests/frameworkimpl/status/statustest.cpp +++ b/storage/src/tests/frameworkimpl/status/statustest.cpp @@ -130,6 +130,7 @@ StatusTest::testIndexStatusPage() "HTTP\\/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: text\\/html\r\n" + "Content-Length: [0-9]+\r\n" "\r\n" "<html>\n" "<head>\n" @@ -160,6 +161,7 @@ StatusTest::testHtmlStatus() "HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: text/html\r\n" + "Content-Length: 117\r\n" "\r\n" "<html>\n" "<head>\n" @@ -187,6 +189,7 @@ StatusTest::testXmlStatus() "HTTP/1.1 200 OK\r\n" "Connection: close\r\n" "Content-Type: application/xml\r\n" + "Content-Length: 100\r\n" "\r\n" "<?xml version=\"1.0\"?>\n" "<status id=\"fooid\" name=\"Foo impl\">\n" 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 |