X-Git-Url: https://git.teslayout.com/public/public/public/?p=anna.git;a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2FEventOperation.cpp;fp=example%2Fdiameter%2Flauncher%2FEventOperation.cpp;h=8b45e61348459e8b7c8c024957f3542856815a5f;hp=2b4248615099becb70b7b1f9e735522a85d97f0c;hb=f34b8069233e9e09208339bb79d8576c1ff962e1;hpb=cef452116c2966d7eaa65ff31ee7613bf3ae1b93 diff --git a/example/diameter/launcher/EventOperation.cpp b/example/diameter/launcher/EventOperation.cpp index 2b42486..8b45e61 100644 --- a/example/diameter/launcher/EventOperation.cpp +++ b/example/diameter/launcher/EventOperation.cpp @@ -1105,12 +1105,23 @@ bool EventOperation::test__finished(std::string &response) { return true; // OK } -bool EventOperation::test__clear(std::string &response) { +bool EventOperation::test__clear(std::string &response, int id) { Launcher& my_app = static_cast (anna::app::functions::getApp()); anna::testing::TestManager &testManager = anna::testing::TestManager::instantiate(); - return testManager.clearPool(response); + if (id == -1) { + return testManager.clearPool(response); + } + + if (!testManager.findTestCase(id)) { + response += "cannot found test id ("; + response += anna::functions::asString(id); + response += ")"; + return false; + } + + return testManager.clearTestCase(response, id); } bool EventOperation::test__junit(std::string &response, const std::string & targetFile) {