Open vasilich6107 opened 1 year ago
I see this comment
// We don't remove queries from intervalQueries immediately in
// stopPollingQuery so that we can keep the timer consistent when queries
// are removed and replaced, and to avoid quadratic behavior when stopping
// many queries.
Could you provide a workaround on writing tests?
Mh I did not write this code, so I should check if this is true and required for me! I will take a look during the holidays
Describe the issue When writing test for queries with polling it fails with
A Timer is still pending even after the widget tree was disposed.
it does not seem thatvoid stopPollingQuery(String queryId) {
method actually stops the timer.To Reproduce (MUST BE PROVIDED)
Write a test for the widget that is querying with poll interval
Expected behavior The timer should be stopped if there is no more queries polling.