Fixed flaky test ReservationAllocatorTest.ResourcesReturned.

Review: https://reviews.apache.org/r/20580