// close the client while the background is still blocked
client.close();
// unblock the background
operationReadyLatch.countDown();
timing.sleepABit();
// should not generate an exception
Assert.assertFalse(hadIllegalStateException.get());
}
finally