elasticsearch/elasticsearch — pull request #6753 by kimchy (2014-07-06 10:35:08+00:00)
Title: Add assertBusy helper test method

We use awaitBusy in our tests, the problem is that we have to check if it awaited or not, and then try and keep around somehow more info around why the predicate failed and a timeout happened.
The idea of assertBusy is to allow to simply write "regular" test code, and if the test code trips, it will busy wait till a timeout. This allows us to keep around the assertion information and properly throw it for information that is inherently kept in the failure itself.