Class TestExecutorExtension<T extends ExecutorService>

java.lang.Object
org.apache.flink.testutils.executor.TestExecutorExtension<T>
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension

public class TestExecutorExtension<T extends ExecutorService> extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
Extension which starts/stops an ExecutorService for testing purposes.
  • Constructor Details

    • TestExecutorExtension

      public TestExecutorExtension(Supplier<T> serviceFactory)
  • Method Details

    • beforeAll

      public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      Throws:
      Exception
    • getExecutor

      public T getExecutor()
    • afterAll

      public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
      Throws:
      Exception