X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Ftesting%2FTestManager.cpp;h=d4b475906f486608e1cef1282482ca63ff104eb9;hb=204a2f272da5c07340a1c3380ad59cec9a81f012;hp=01487fea7a0790454fbd3fef28e3f4e2f9bfe96e;hpb=0a29aaeb86cc31d808f88d8c9a046f5858ed3089;p=anna.git diff --git a/example/diameter/launcher/testing/TestManager.cpp b/example/diameter/launcher/testing/TestManager.cpp index 01487fe..d4b4759 100644 --- a/example/diameter/launcher/testing/TestManager.cpp +++ b/example/diameter/launcher/testing/TestManager.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include class TestTimer; @@ -95,6 +95,7 @@ TestManager::TestManager() : a_inProgressLimit = UINT_MAX; // no limit a_clock = NULL; //a_testPool.clear(); + //a_statSummary.clear(); a_currentTestIt = a_testPool.end(); } @@ -371,7 +372,7 @@ TestCase *TestManager::getTestCaseFromSessionId(const anna::DataBlock &message, return NULL; } -void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) { +void TestManager::receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException) { // Testing disabled: if (!tests()) return; @@ -391,10 +392,10 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real codecMsg.decode(message); hint += "\n"; hint += codecMsg.asXMLString(); - // // Realm checking: - // std::string messageOR = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Realm)->getDiameterIdentity()->getValue(); - // if (messageOR != realm->getName()) { - // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from realm '%s', with different Origin-Realm: %s", realm->getName().c_str(), messageOR.c_str()), ANNA_FILE_LOCATION)); + // // Host checking: + // std::string messageOH = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Host)->getDiameterIdentity()->getValue(); + // if (messageOH != host->getName()) { + // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from host '%s', with different Origin-Host: %s", host->getName().c_str(), messageOH.c_str()), ANNA_FILE_LOCATION)); // } } catch (anna::RuntimeException &ex) { @@ -411,7 +412,7 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real } } -void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *realm, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) { +void TestManager::receiveMessage(const anna::DataBlock &message, OriginHost *host, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException) { // Testing disabled: if (!tests()) return; @@ -431,10 +432,10 @@ void TestManager::receiveMessage(const anna::DataBlock &message, RealmNode *real codecMsg.decode(message); hint += "\n"; hint += codecMsg.asXMLString(); - // // Realm checking: - // std::string messageOR = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Realm)->getDiameterIdentity()->getValue(); - // if (messageOR != realm->getName()) { - // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from realm '%s', with different Origin-Realm: %s", realm->getName().c_str(), messageOR.c_str()), ANNA_FILE_LOCATION)); + // // Host checking: + // std::string messageOH = message.getAvp(anna::diameter::helpers::base::AVPID__Origin_Host)->getDiameterIdentity()->getValue(); + // if (messageOH != host->getName()) { + // LOGWARNING(anna::Logger::warning(anna::functions::asString("Received message from host '%s', with different Origin-Host: %s", host->getName().c_str(), messageOH.c_str()), ANNA_FILE_LOCATION)); // } } catch (anna::RuntimeException &ex) {