diff --git a/unit_tests/engine_test_helper.cpp b/unit_tests/engine_test_helper.cpp index b11797c511..b01ff3a579 100644 --- a/unit_tests/engine_test_helper.cpp +++ b/unit_tests/engine_test_helper.cpp @@ -92,6 +92,8 @@ void EngineTestHelper::fireTriggerEvents2(int count, int durationUs) { } void EngineTestHelper::clearQueue() { + schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag + assertEqualsM("queue size/0", 0, schedulingQueue.size()); engine.iHead = NULL; // let's drop whatever was scheduled just to start from a clean state } diff --git a/unit_tests/test_trigger_decoder.cpp b/unit_tests/test_trigger_decoder.cpp index 64f8884488..1e9581c386 100644 --- a/unit_tests/test_trigger_decoder.cpp +++ b/unit_tests/test_trigger_decoder.cpp @@ -329,8 +329,6 @@ void testRpmCalculator(void) { assertEqualsM("index #1", 15, eth.engine.triggerCentral.triggerState.getCurrentIndex()); - schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag - assertEqualsM("queue size/0", 0, schedulingQueue.size()); eth.clearQueue(); debugSignalExecutor = true; @@ -655,7 +653,6 @@ static void setTestBug299(EngineTestHelper *eth) { eth->fireTriggerEvents2(1, MS2US(20)); assertEqualsM("RPM#2", 3000, engine->rpmCalculator.getRpm(PASS_ENGINE_PARAMETER_SIGNATURE)); - schedulingQueue.executeAll(99999999); // this is needed to clear 'isScheduled' flag eth->clearQueue(); /**