Class AsyncEmbeddedEngineTest

java.lang.Object
io.debezium.embedded.async.AsyncEmbeddedEngineTest

public class AsyncEmbeddedEngineTest extends Object
Tests for AsyncEmbeddedEngine implementation of DebeziumEngine.
Author:
vjuranek
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NUMBER_OF_LINES

      private static final int NUMBER_OF_LINES
      See Also:
    • OFFSET_STORE_PATH

      protected static final Path OFFSET_STORE_PATH
    • TEST_FILE_PATH

      private static final Path TEST_FILE_PATH
    • isEngineRunning

      protected static final AtomicBoolean isEngineRunning
    • runningTasks

      protected static final AtomicInteger runningTasks
    • engine

      protected io.debezium.engine.DebeziumEngine<org.apache.kafka.connect.source.SourceRecord> engine
    • engineExecSrv

      protected ExecutorService engineExecSrv
    • inputFile

      private File inputFile
    • linesAdded

      private int linesAdded
  • Constructor Details

    • AsyncEmbeddedEngineTest

      public AsyncEmbeddedEngineTest()
  • Method Details

    • beforeEach

      public void beforeEach() throws Exception
      Throws:
      Exception
    • testEngineBasicLifecycle

      public void testEngineBasicLifecycle() throws Exception
      Throws:
      Exception
    • testRunMultipleTasks

      public void testRunMultipleTasks() throws Exception
      Throws:
      Exception
    • testTasksAreStoppedIfSomeFailsToStart

      public void testTasksAreStoppedIfSomeFailsToStart()
    • testCompletionCallbackCalledUponSuccess

      public void testCompletionCallbackCalledUponSuccess() throws Exception
      Throws:
      Exception
    • testCompletionCallbackCalledUponFailure

      public void testCompletionCallbackCalledUponFailure() throws Exception
      Throws:
      Exception
    • testCannotStopWhileTasksAreStarting

      @FixFor("DBZ-2534") public void testCannotStopWhileTasksAreStarting() throws Exception
      Throws:
      Exception
    • testCannotStopAlreadyStoppedEngine

      public void testCannotStopAlreadyStoppedEngine() throws Exception
      Throws:
      Exception
    • testExecuteSmt

      public void testExecuteSmt() throws Exception
      Throws:
      Exception
    • testPollingIsRetriedUponFailure

      public void testPollingIsRetriedUponFailure() throws Exception
      Throws:
      Exception
    • testConnectorFailsIfMaxRetriesExceeded

      public void testConnectorFailsIfMaxRetriesExceeded() throws Exception
      Throws:
      Exception
    • testEngineBasicLifecycleConsumerSequentially

      public void testEngineBasicLifecycleConsumerSequentially() throws Exception
      Throws:
      Exception
    • testEngineBasicLifecycleConsumerNonSequentially

      public void testEngineBasicLifecycleConsumerNonSequentially() throws Exception
      Throws:
      Exception
    • testCompletionCallbackCalledAfterConnectorStop

      @FixFor("DBZ-7496") public void testCompletionCallbackCalledAfterConnectorStop() throws Exception
      Throws:
      Exception
    • runEngineBasicLifecycleWithConsumer

      private void runEngineBasicLifecycleWithConsumer(Properties props) throws IOException, InterruptedException
      Throws:
      IOException
      InterruptedException
    • stopEngine

      protected void stopEngine()
    • waitForEngineToStart

      protected void waitForEngineToStart()
    • waitForEngineToStop

      protected void waitForEngineToStop()
    • waitForTasksToStart

      protected void waitForTasksToStart(int minRunningTasks)
    • appendLinesToSource

      protected void appendLinesToSource(int numberOfLines) throws IOException
      Throws:
      IOException