race test: exit loop on exception

pull/567/head
Nitin 9 years ago
parent d3bc0a155a
commit a007e730be

@ -56,13 +56,16 @@ public class ConnectionRaceConditionTest
return null;
}
});
if (ref.get() != null) {
break;
}
}
threadPool.shutdown();
threadPool.awaitTermination(30, TimeUnit.SECONDS);
if (ref.get() != null) {
LoggerFactory.getLogger(ConnectionRaceConditionTest.class).error("Submit1 task failed", ref.get());
LoggerFactory.getLogger(ConnectionRaceConditionTest.class).error("Task failed", ref.get());
Assert.fail("Task failed");
}
}

Loading…
Cancel
Save