phetsims / utterance-queue

Alerting library powered by aria-live
MIT License
0 stars 2 forks source link

Something isn't right with the timing in UtteranceTests #44

Closed jessegreenberg closed 2 years ago

jessegreenberg commented 2 years ago

The alertMaximumDelay tests don't always pass, though sometimes they do.

What I am finding is that in between the timeouts like

await timeout( 100 );

The stable time before the timeout is zero, and after the timeout is > 200. So UtteranceQueue things that it has waited 200 ms, even though it has waited only 100.

jessegreenberg commented 2 years ago

Hmm, I am not seeing this anymore locally or on CT. At one point in my testing I saw UtteranceQueue.step being called twice from the same stepTimer.emit, so I wonder if I accidentally had stepTimer.emit() twice somewhere in UtteranceTests. But this is not happening anymore, closing.