Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5054

Mysql tests start before MySQL DB constainer is running

XMLWordPrintable

    • False
    • None
    • False

      MySQL container shuts the container down during setup and later on starts it again. However, maven docker plugin waits for [Entrypoint] MySQL init process done. Ready for start up. string in the log, which happens before container is started. As a result, tests which connects to the database at the very beginning of the tests (e.g. IncrementalSnapshotIT) may fails with

      [ERROR] Tests run: 12, Failures: 0, Errors: 12, Skipped: 0, Time elapsed: 0.552 s <<< FAILURE! - in io.debezium.connector.mysql.IncrementalSnapshotIT
      [ERROR] io.debezium.connector.mysql.IncrementalSnapshotIT.updates  Time elapsed: 0.417 s  <<< ERROR!
      java.lang.IllegalStateException: 
      com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
      
      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
              at io.debezium.connector.mysql.IncrementalSnapshotIT.before(IncrementalSnapshotIT.java:37)
      Caused by: com.mysql.cj.jdbc.exceptions.CommunicationsException: 
      Communications link failure
      
      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
              at io.debezium.connector.mysql.IncrementalSnapshotIT.before(IncrementalSnapshotIT.java:37)
      Caused by: com.mysql.cj.exceptions.CJCommunicationsException: 
      Communications link failure
      
      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
              at io.debezium.connector.mysql.IncrementalSnapshotIT.before(IncrementalSnapshotIT.java:37)
      Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
              at io.debezium.connector.mysql.IncrementalSnapshotIT.before(IncrementalSnapshotIT.java:37)
      

      as the MySQL server is not fully started yet.

      This is random failure as CI is passing without any issue and on my machines it worked reliably ~2 weeks ago. Now, it always fails.

            vjuranek@redhat.com Vojtech Juranek
            vjuranek@redhat.com Vojtech Juranek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: