@AfterMethod
  public void cleanUp(Method method) throws InterruptedException {
    // A previous test didn't call onComplete on the processor, manual clean up
    if (driverManager.getCounter() > 0) {

      Thread.sleep(1000);

      if (driverManager.getCounter() > 0) {
        System.err.println(
            "Possibly method " + method.getName() + " didn't call onComplete on processor");

        for (AeronProcessor processor : processors) {
          processor.shutdown();
          TestSubscriber.await(5L, "processor didn't terminate", processor::isTerminated);
        }

        TestSubscriber.await(
            5L,
            "Embedded Media driver wasn't shutdown properly",
            () -> driverManager.getCounter() == 0);
      }
    }

    processors.clear();
  }
  @BeforeClass
  public void doSetup() {
    AeronTestUtils.setAeronEnvProps();

    driverManager = EmbeddedMediaDriverManager.getInstance();
    driverManager.setShouldShutdownWhenNotUsed(false);
  }
 @AfterClass
 public void doTeardown() throws InterruptedException {
   driverManager.shutdown();
   AeronTestUtils.awaitMediaDriverIsTerminated(10);
 }