Skip to content

Commit

Permalink
Tests: Fix some perpetually-running timer tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rdw-software committed Feb 23, 2024
1 parent bdf9e21 commit 18a03db
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 18a03db

Please sign in to comment.