From: Eduardo Ramos Testillano Date: Sat, 27 Feb 2016 16:16:46 +0000 (+0100) Subject: Improve traces in testing system X-Git-Tag: REFACTORING_TESTING_LIBRARY~27 X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=commitdiff_plain;h=2dc559e7fbe3f250f5aff1a23614181fc0b2e7f1 Improve traces in testing system --- diff --git a/example/diameter/launcher/testing/TestCase.cpp b/example/diameter/launcher/testing/TestCase.cpp index 8cbba4b..5678ff0 100644 --- a/example/diameter/launcher/testing/TestCase.cpp +++ b/example/diameter/launcher/testing/TestCase.cpp @@ -232,7 +232,7 @@ void TestCase::assertMessage(const anna::DataBlock &db, bool toEntity) throw(ann bool isRequest = anna::diameter::codec::functions::isRequest(db); bool registerSessionId = ((isRequest && toEntity) || (!isRequest && !toEntity) /* (*) */); // (*) we register answers Session-Id assuming that we will know the Session-Id values created by the client (OCS) - // This is another solution for TODO(***) regarding diameter server testing. No tsure about the final implementation. + // This is another solution for TODO(***) regarding diameter server testing. No sure about the final implementation. // Check hop-by-hop: if (isRequest) { diff --git a/example/diameter/launcher/testing/TestManager.cpp b/example/diameter/launcher/testing/TestManager.cpp index d4b4759..75955ce 100644 --- a/example/diameter/launcher/testing/TestManager.cpp +++ b/example/diameter/launcher/testing/TestManager.cpp @@ -110,6 +110,7 @@ void TestManager::registerSessionId(const std::string &sessionId, const TestCase } else { a_sessionIdTestCaseMap[sessionId] = const_cast(testCase); + LOGDEBUG(anna::Logger::debug(anna::functions::asString("TestManager::registerSessionId for test case (id = %llu): %s)", testCase->getId(), sessionId.c_str()), ANNA_FILE_LOCATION)); } } diff --git a/example/diameter/launcher/testing/TestStep.cpp b/example/diameter/launcher/testing/TestStep.cpp index 9bb5230..07ed685 100644 --- a/example/diameter/launcher/testing/TestStep.cpp +++ b/example/diameter/launcher/testing/TestStep.cpp @@ -181,7 +181,10 @@ bool TestStep::decodeMessage(bool trust) throw() { if (a_messageCodec) return true; a_messageCodec = new anna::diameter::codec::Message; if (::decodeMessage(a_message, *a_messageCodec)) return true; - if (trust) return true; + if (trust) { + LOGDEBUG(anna::Logger::debug("Error DECODING, but trusting it ...", ANNA_FILE_LOCATION)); + return true; + } delete a_messageCodec; a_messageCodec = NULL;