projects
/
anna.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
690d411
)
Improve traces in testing system
author
Eduardo Ramos Testillano
<eduardo.ramos.testillano@ericsson.com>
Sat, 27 Feb 2016 16:16:46 +0000
(17:16 +0100)
committer
Eduardo Ramos Testillano
<eduardo.ramos.testillano@ericsson.com>
Sat, 27 Feb 2016 16:16:46 +0000
(17:16 +0100)
example/diameter/launcher/testing/TestCase.cpp
patch
|
blob
|
history
example/diameter/launcher/testing/TestManager.cpp
patch
|
blob
|
history
example/diameter/launcher/testing/TestStep.cpp
patch
|
blob
|
history
diff --git
a/example/diameter/launcher/testing/TestCase.cpp
b/example/diameter/launcher/testing/TestCase.cpp
index
8cbba4b
..
5678ff0
100644
(file)
--- 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)
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
t
sure 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) {
// 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
(file)
--- 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*>(testCase);
}
else {
a_sessionIdTestCaseMap[sessionId] = const_cast<TestCase*>(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
(file)
--- 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 (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;
delete a_messageCodec;
a_messageCodec = NULL;