neo4j/neo4j — pull request #3669 by davidegrohmann (2014-12-15 13:43:30+00:00)
Title: Fix flaky test in IndexSamplingControllerTest

Make sure that when checking the decrement of the counter the thread
is still holding the lock by non-returning from the create method.
Otherwise a race might happen, i.e., before the condition has been
verified the other thread would be scheduled and access the create
method (since the other thread has released the lock) and it will
increment again the counter causing the test to fail.