less brittle tests (setInterval is not exact)