From 94885ecbbddd98054f7e958bd63c148fa87b4401 Mon Sep 17 00:00:00 2001 From: RDW Date: Fri, 23 Feb 2024 03:04:44 +0100 Subject: [PATCH] Tests: Fix some perpetually-running timer tests Not sure why this wasn't a problem before, but the ticker is never stopped and so the event loop may keep running if it has been invoked once. The timer API (and tests) definitely need a rework, but for now this band-aid should help at least a little bit. --- Tests/BDD/timer-namespace.spec.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Tests/BDD/timer-namespace.spec.lua b/Tests/BDD/timer-namespace.spec.lua index 50a2cd0e..5d563830 100644 --- a/Tests/BDD/timer-namespace.spec.lua +++ b/Tests/BDD/timer-namespace.spec.lua @@ -217,6 +217,7 @@ describe("C_Timer", function() C_Timer.Pause(ticker) waitFor(2 * 100 * MAXIMUM_EPSILON_MODIFIER) assertEquals(callbackCalledCount, 0) + C_Timer.Stop(ticker) end) end) @@ -246,6 +247,7 @@ describe("C_Timer", function() C_Timer.Resume(ticker) waitFor(2 * 100 * MAXIMUM_EPSILON_MODIFIER) assertTrue(callbackCalledCount >= 1) + C_Timer.Stop(ticker) end) end)