@Override protected void tearDown() throws Exception { super.tearDown(); schedInline.shutdown(); assertTrue(schedInline.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS)); schedPooled.shutdown(); assertTrue(schedPooled.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS)); // Note: This is always true because the inline scheduler never says no assertTrue(schedInline.isShutdown()); assertTrue(schedPooled.isShutdown()); }