Fix occasional black box text failures

There was a 1000 ms delay for checking that an immediate task is executed. If the runner poll delay is 1000ms, the runner sometimes did not have enough time to execute the immediate task and the test failed.