Changed some Thread.sleep() calls to use while() loops instead so that
the timing is more reliable in PollerTest.