Skip to content

Commit

Permalink
Tests: Fix some perpetually-running timer tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rdw-software committed Feb 23, 2024
1 parent bdf9e21 commit 94885ec
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/BDD/timer-namespace.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 94885ec

Please sign in to comment.