Fixed AllocatorTest.FrameworkExited test.

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