Added a test to make sure that the poller returns the correct number of
finished queries