aboutsummaryrefslogtreecommitdiffstats
path: root/storage/src/tests/common/hostreporter/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'storage/src/tests/common/hostreporter/util.cpp')
-rw-r--r--storage/src/tests/common/hostreporter/util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/src/tests/common/hostreporter/util.cpp b/storage/src/tests/common/hostreporter/util.cpp
index a9578e8d8cf..e0563a431e6 100644
--- a/storage/src/tests/common/hostreporter/util.cpp
+++ b/storage/src/tests/common/hostreporter/util.cpp
@@ -24,10 +24,10 @@ reporterToSlime(HostReporter &hostReporter, vespalib::Slime &slime) {
hostReporter.report(stream);
stream << End();
std::string jsonData = json.str();
- size_t parsedSize = JsonFormat::decode(Memory(jsonData), slime);
+ size_t parsed = JsonFormat::decode(Memory(jsonData), slime);
- if (jsonData.size() != parsedSize) {
- CPPUNIT_FAIL("Sizes of jsonData mismatched, probably not json:\n" + jsonData);
+ if (parsed == 0) {
+ CPPUNIT_FAIL("jsonData is not json:\n" + jsonData);
}
}
}