X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=example%2Fdiameter%2Flauncher%2Ftesting%2FTestStep.cpp;h=524e0bdf3841df386200d6a433a1380736a4c7a8;hb=983eaadca6cfae987be3453853d75bb9bce04487;hp=cb1b0f91eefa549499bb1c8caa05c5a4a0bdc569;hpb=c6b62fd814b6e5b4e3ba65b6f092f6aa4e1d298d;p=anna.git diff --git a/example/diameter/launcher/testing/TestStep.cpp b/example/diameter/launcher/testing/TestStep.cpp index cb1b0f9..524e0bd 100644 --- a/example/diameter/launcher/testing/TestStep.cpp +++ b/example/diameter/launcher/testing/TestStep.cpp @@ -483,12 +483,13 @@ throw() { anna::xml::Node* result = TestStep::asXML(parent); //parent->createChild("TestStepDelay"); - result->createAttribute("Delay", a_delay.asString()); + result->createAttribute("Delay", ((a_delay == 0) ? "dummy step, no delay" : a_delay.asString())); return result; } bool TestStepDelay::do_execute() throw() { + if (a_delay == 0) { complete(); return true; } // special case try { a_timer = TestManager::instantiate().createTimer((TestCaseStep*)this, a_delay, TestTimer::Type::Delay); } @@ -502,12 +503,14 @@ bool TestStepDelay::do_execute() throw() { } void TestStepDelay::do_complete() throw() { + if (a_delay == 0) return; // special case a_timer = NULL; next(); // next() invoked here because execute() is always false for delay and never advance the iterator // TODO, avoid this recursion } void TestStepDelay::do_reset() throw() { + if (a_delay == 0) return; // special case try { TestManager::instantiate().cancelTimer(a_timer); }