summaryrefslogtreecommitdiffstats
path: root/metrics
diff options
context:
space:
mode:
authorHåvard Pettersen <havardpe@oath.com>2017-09-28 15:26:40 +0000
committerHåvard Pettersen <havardpe@oath.com>2017-09-29 10:16:46 +0000
commitabefb37a660e395342a1460e233a0933d2e10dc9 (patch)
tree8f7bbea42745102db5269a89e6efdbce117fc603 /metrics
parent88a6576a3cf7b15b2bf9a4cd3bcc861e3a4f38c0 (diff)
avoid requiring that json parsing consumes all input
(the input could end with \n if human readable)
Diffstat (limited to 'metrics')
-rw-r--r--metrics/src/tests/metricmanagertest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/metrics/src/tests/metricmanagertest.cpp b/metrics/src/tests/metricmanagertest.cpp
index a086cf70ca9..aea13de69da 100644
--- a/metrics/src/tests/metricmanagertest.cpp
+++ b/metrics/src/tests/metricmanagertest.cpp
@@ -779,7 +779,7 @@ void MetricManagerTest::testJsonOutput()
using namespace vespalib::slime;
vespalib::Slime slime;
size_t parsed = JsonFormat::decode(vespalib::Memory(jsonData), slime);
- if (jsonData.size() != parsed) {
+ if (!parsed) {
vespalib::SimpleBuffer buffer;
JsonFormat::encode(slime, buffer, false);
std::ostringstream ost;