aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@oath.com>2018-01-19 14:11:02 +0000
committerTor Brede Vekterli <vekterli@oath.com>2018-01-19 14:11:02 +0000
commitdf171bcef711e1c56ea7f31f486b7eb821600851 (patch)
tree2aea49ac0ce7b23e7131fa483dfac54900f142c1 /storage/src/tests
parent2b8eca7483f08f9a3a3e3b1765ca1060b9516da6 (diff)
Add bouncer metric set and clock skew abort metric
Diffstat (limited to 'storage/src/tests')
-rw-r--r--storage/src/tests/storageserver/bouncertest.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/storage/src/tests/storageserver/bouncertest.cpp b/storage/src/tests/storageserver/bouncertest.cpp
index 5be57155ec9..a4f7ed915d8 100644
--- a/storage/src/tests/storageserver/bouncertest.cpp
+++ b/storage/src/tests/storageserver/bouncertest.cpp
@@ -5,6 +5,7 @@
#include <vespa/storageapi/message/state.h>
#include <vespa/storageapi/message/stat.h>
#include <vespa/storage/storageserver/bouncer.h>
+#include <vespa/storage/storageserver/bouncer_metrics.h>
#include <tests/common/teststorageapp.h>
#include <tests/common/testhelper.h>
#include <tests/common/dummystoragelink.h>
@@ -122,6 +123,7 @@ BouncerTest::createDummyFeedMessage(api::Timestamp timestamp,
void
BouncerTest::testFutureTimestamp()
{
+ CPPUNIT_ASSERT_EQUAL(uint64_t(0), _manager->metrics().clock_skew_aborts.getValue());
// Fail when future timestamps (more than 5 seconds) are received.
{
@@ -134,6 +136,7 @@ BouncerTest::testFutureTimestamp()
getResult().getResult());
_upper->reset();
}
+ CPPUNIT_ASSERT_EQUAL(uint64_t(1), _manager->metrics().clock_skew_aborts.getValue());
// Verify that 1 second clock skew is OK
{
@@ -151,7 +154,7 @@ BouncerTest::testFutureTimestamp()
CPPUNIT_ASSERT_EQUAL(1, (int)_lower->getNumCommands());
}
-
+ CPPUNIT_ASSERT_EQUAL(uint64_t(1), _manager->metrics().clock_skew_aborts.getValue());
}
void