Class JavaProgramTestBase

java.lang.Object
org.apache.flink.test.util.AbstractTestBase
org.apache.flink.test.util.JavaProgramTestBase

public abstract class JavaProgramTestBase extends AbstractTestBase
Base class for unit tests that run a single test with object reuse enabled/disabled and against collection environments.

To write a unit test against this test base, simply extend it and implement the testProgram() method.

To skip the execution against collection environments you have to override skipCollectionExecution().

  • Constructor Details

    • JavaProgramTestBase

      public JavaProgramTestBase()
  • Method Details

    • setNumberOfTestRepetitions

      public void setNumberOfTestRepetitions(int numberOfTestRepetitions)
    • getParallelism

      public int getParallelism()
    • getLatestExecutionResult

      public org.apache.flink.api.common.JobExecutionResult getLatestExecutionResult()
    • isCollectionExecution

      public boolean isCollectionExecution()
    • testProgram

      protected abstract org.apache.flink.api.common.JobExecutionResult testProgram() throws Exception
      Throws:
      Exception
    • preSubmit

      protected void preSubmit() throws Exception
      Throws:
      Exception
    • postSubmit

      protected void postSubmit() throws Exception
      Throws:
      Exception
    • skipCollectionExecution

      protected boolean skipCollectionExecution()
    • testJobWithObjectReuse

      @Test public void testJobWithObjectReuse() throws Exception
      Throws:
      Exception
    • testJobWithoutObjectReuse

      @Test public void testJobWithoutObjectReuse() throws Exception
      Throws:
      Exception