X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=include%2Fanna%2Ftesting%2FTestManager.hpp;h=82fdf990182afa0df70262387eed5a50d497ff18;hp=979941ffb00e087404e6c3858b7fe16bb0ba2b80;hb=303d3e2584497a05fc715fbf32b57dcf81805f38;hpb=26ae04c7e1eba19d02823bcc87c0ee9f6ce76186 diff --git a/include/anna/testing/TestManager.hpp b/include/anna/testing/TestManager.hpp index 979941f..82fdf99 100644 --- a/include/anna/testing/TestManager.hpp +++ b/include/anna/testing/TestManager.hpp @@ -95,14 +95,12 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto // Test timers timer_container a_timers; - // Test case identifiers: - // Session-Id's - std::map a_sessionIdTestCaseMap; // stores used Session-Id values within a test case. - // No other can use them, but a test case could use more than one. - // Subscriber's - std::map a_subscriberIdTestCaseMap; // stores used Subscriber-Id values within a test case. - + // Test case identifiers: key1 (strong); key2 (alternative) + std::map a_key1TestCaseMap; + std::map a_key2TestCaseMap; + // Diameter shall use: key1 -> sessionId, key2 -> subscriberId + // StatSummary a_statSummary; // general statistics @@ -118,8 +116,8 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto public: - void registerSessionId(const std::string &sessionId, const TestCase *testCase) throw(anna::RuntimeException); - void registerSubscriberId(const std::string &subscriberId, const TestCase *testCase) throw(anna::RuntimeException); + void registerKey1(const std::string &key, const TestCase *testCase) throw(anna::RuntimeException); + void registerKey2(const std::string &key, const TestCase *testCase) throw(anna::RuntimeException); int tests() const throw() { return a_testPool.size(); } void setTimerController(anna::timex::Engine *engine) throw() { a_timeController = engine; } @@ -169,11 +167,15 @@ class TestManager : public anna::timex::TimeEventObserver, public anna::Singleto TestCase *findTestCase(unsigned int id) const throw(); // id = -1 provides current test case triggered TestCase *getTestCase(unsigned int id) throw(); // creates/reuses a test case - // Main logic - TestCase *getTestCaseFromSessionId(const anna::DataBlock &message, std::string &sessionId) throw(); - TestCase *getTestCaseFromSubscriberId(const anna::DataBlock &message, std::string &subscriberId) throw(); - void receiveMessage(const anna::DataBlock &message, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException); - void receiveMessage(const anna::DataBlock &message, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException); + // Diameter + TestCase *getDiameterTestCaseFromSessionId(const anna::DataBlock &message, std::string &sessionId) throw(); + TestCase *getDiameterTestCaseFromSubscriberId(const anna::DataBlock &message, std::string &subscriberId) throw(); + void receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ClientSession *clientSession) throw(anna::RuntimeException); + void receiveDiameterMessage(const anna::DataBlock &message, const anna::diameter::comm::ServerSession *serverSession) throw(anna::RuntimeException); + + // Non-trasactional (kafka) + // + // bool execTestCases(int sync_amount) throw();