From 18a03db721fe40fab2f59d6675bc2304d34ae168 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 This wasn't a problem before, but the ticker is never stopped and so the event loop may keep running if it hasn't been explicitly stopped by the other test. The timer API definitely needs some work, but for now this band-aid should help 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)