Fixed random failures with Poll spec
What does this MR do?
Fixes random failures with the Poll spec.
Correctly waits for requests to finish before testing anything. Previously it was waiting for a set amount of time which could possibly cause failures dependant on how quickly these execute
Stops any polling requests once done so that the error callback doesn't
Closes #30824 (closed)