summaryrefslogtreecommitdiffstats
path: root/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-09-14 00:13:11 +0200
committerGitHub <noreply@github.com>2016-09-14 00:13:11 +0200
commit0836f0bf337ee23c5e66f420cfa54d49e4a2104e (patch)
tree403c361cd30043cc3de04483489cfa8e25fe0ff3 /messagebus_test/src/tests/errorcodes/dumpcodes.cpp
parent4537f2d1e36f41e74f348258aecf448b77ef1799 (diff)
Revert "Aressem/move messagebus test tests to separate module"
Diffstat (limited to 'messagebus_test/src/tests/errorcodes/dumpcodes.cpp')
-rw-r--r--messagebus_test/src/tests/errorcodes/dumpcodes.cpp70
1 files changed, 0 insertions, 70 deletions
diff --git a/messagebus_test/src/tests/errorcodes/dumpcodes.cpp b/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
deleted file mode 100644
index 121d8585726..00000000000
--- a/messagebus_test/src/tests/errorcodes/dumpcodes.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
-#include <vespa/log/log.h>
-LOG_SETUP("dumpcodes");
-#include <vespa/messagebus/errorcode.h>
-#include <string>
-
-using namespace mbus;
-
-class App : public FastOS_Application
-{
-public:
- void dump(const std::string &desc, uint32_t value);
- int Main();
-};
-
-void
-App::dump(const std::string &desc, uint32_t value)
-{
- fprintf(stdout, "%s => %u => \"%s\"\n", desc.c_str(), value,
- ErrorCode::getName(value).c_str());
-}
-
-int
-App::Main()
-{
- dump("NONE", ErrorCode::NONE);
-
- dump("SEND_QUEUE_FULL", ErrorCode::SEND_QUEUE_FULL);
- dump("NO_ADDRESS_FOR_SERVICE", ErrorCode::NO_ADDRESS_FOR_SERVICE);
- dump("CONNECTION_ERROR", ErrorCode::CONNECTION_ERROR);
- dump("UNKNOWN_SESSION", ErrorCode::UNKNOWN_SESSION);
- dump("SESSION_BUSY", ErrorCode::SESSION_BUSY);
- dump("SEND_ABORTED", ErrorCode::SEND_ABORTED);
- dump("HANDSHAKE_FAILED", ErrorCode::HANDSHAKE_FAILED);
- dump("first unused TRANSIENT_ERROR", ErrorCode::TRANSIENT_ERROR + 8);
-
- dump("SEND_QUEUE_CLOSED", ErrorCode::SEND_QUEUE_CLOSED);
- dump("ILLEGAL_ROUTE", ErrorCode::ILLEGAL_ROUTE);
- dump("NO_SERVICES_FOR_ROUTE", ErrorCode::NO_SERVICES_FOR_ROUTE);
- dump("SERVICE_OOS", ErrorCode::SERVICE_OOS);
- dump("ENCODE_ERROR", ErrorCode::ENCODE_ERROR);
- dump("NETWORK_ERROR", ErrorCode::NETWORK_ERROR);
- dump("UNKNOWN_PROTOCOL", ErrorCode::UNKNOWN_PROTOCOL);
- dump("DECODE_ERROR", ErrorCode::DECODE_ERROR);
- dump("TIMEOUT", ErrorCode::TIMEOUT);
- dump("INCOMPATIBLE_VERSION", ErrorCode::INCOMPATIBLE_VERSION);
- dump("UNKNOWN_POLICY", ErrorCode::UNKNOWN_POLICY);
- dump("NETWORK_SHUTDOWN", ErrorCode::NETWORK_SHUTDOWN);
- dump("POLICY_ERROR", ErrorCode::POLICY_ERROR);
- dump("SEQUENCE_ERROR", ErrorCode::SEQUENCE_ERROR);
- dump("first unused FATAL_ERROR", ErrorCode::FATAL_ERROR + 15);
-
- dump("max UNKNOWN below", ErrorCode::TRANSIENT_ERROR - 1);
- dump("min TRANSIENT_ERROR", ErrorCode::TRANSIENT_ERROR);
- dump("max TRANSIENT_ERROR", ErrorCode::TRANSIENT_ERROR + 49999);
- dump("min APP_TRANSIENT_ERROR", ErrorCode::APP_TRANSIENT_ERROR);
- dump("max APP_TRANSIENT_ERROR", ErrorCode::APP_TRANSIENT_ERROR + 49999);
- dump("min FATAL_ERROR", ErrorCode::FATAL_ERROR);
- dump("max FATAL_ERROR", ErrorCode::FATAL_ERROR + 49999);
- dump("min APP_FATAL_ERROR", ErrorCode::APP_FATAL_ERROR);
- dump("max APP_FATAL_ERROR", ErrorCode::APP_FATAL_ERROR + 49999);
- dump("min UNKNOWN above", ErrorCode::ERROR_LIMIT);
- return 0;
-}
-
-int main(int argc, char **argv) {
- App app;
- return app.Entry(argc, argv);
-}