summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/documentdb
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2018-06-12 12:50:28 +0200
committerArne Juul <arnej@yahoo-inc.com>2018-06-12 13:51:45 +0200
commit016e584f0ad5a071e13d75eb8ad5ddb46b8c54f5 (patch)
tree869d4e4a4c4b8a9f9ef691b2980009017dece9e6 /searchcore/src/tests/proton/documentdb
parent22796dddd3dc025018093783328ac87535ffecd9 (diff)
use LOG_ABORT not just abort()
* abort() has the unfortunate effect that nothing is seen in the log, just an event (which is usually not displayed); so ops people don't see that the program is crashing at all. * LOG_ABORT("message") will log an error with the message (and the file and line) before calling abort(), so it's easy to see what happened. * add or move <vespa/log/log.h> include and LOG_SETUP lines before LOG_ABORT is used (or included).
Diffstat (limited to 'searchcore/src/tests/proton/documentdb')
-rw-r--r--searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp3
-rw-r--r--searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp10
3 files changed, 11 insertions, 5 deletions
diff --git a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
index b5cf1733ba9..0af15f0bd05 100644
--- a/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/clusterstatehandler/clusterstatehandler_test.cpp
@@ -1,4 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("cluster_state_handler_test");
+
#include <vespa/searchcore/proton/server/clusterstatehandler.h>
#include <vespa/searchcore/proton/server/iclusterstatechangedhandler.h>
#include <vespa/searchcore/proton/test/test.h>
diff --git a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
index 11e9aa8c3ec..7daab40c40f 100644
--- a/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/documentbucketmover/documentbucketmover_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("document_bucket_mover_test");
+
#include <vespa/searchcore/proton/bucketdb/bucketdbhandler.h>
#include <vespa/searchcore/proton/bucketdb/bucket_create_notifier.h>
#include <vespa/searchcore/proton/test/bucketfactory.h>
diff --git a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
index c7790f9c507..3ddcebbc428 100644
--- a/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/maintenancecontroller/maintenancecontroller_test.cpp
@@ -1,5 +1,8 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+#include <vespa/log/log.h>
+LOG_SETUP("maintenancecontroller_test");
+
#include <vespa/document/repo/documenttyperepo.h>
#include <vespa/document/test/make_bucket_space.h>
#include <vespa/searchcore/proton/attribute/attribute_usage_filter.h>
@@ -38,9 +41,6 @@
#include <vespa/vespalib/util/threadstackexecutor.h>
#include <unistd.h>
-#include <vespa/log/log.h>
-LOG_SETUP("maintenancecontroller_test");
-
using namespace proton;
using namespace vespalib::slime;
using document::BucketId;
@@ -153,14 +153,14 @@ struct MyDocumentRetriever : public DocumentRetrieverBaseForTest
virtual const document::DocumentTypeRepo &
getDocumentTypeRepo() const override
{
- abort();
+ LOG_ABORT("should not be reached");
}
virtual void
getBucketMetaData(const storage::spi::Bucket &,
DocumentMetaData::Vector &) const override
{
- abort();
+ LOG_ABORT("should not be reached");
}
virtual DocumentMetaData
getDocumentMetaData(const DocumentId &) const override