service.shutdownNow(); // will interrupt all threads
while(!service.isTerminated()) {
Thread.sleep(100);
}
CoordinationStructures coord = TestUtils.getCoordinationStructures(config);
assertNotNull(coord.getCopyVersionsBeingServed().get(TABLESPACE));
// Assert that there is only MAX_VERSIONS versions of the tablespace (due to old version cleanup)
new TestUtils.NotWaitingForeverCondition() {
@Override