diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f5d8d84..d58c09d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,10 +27,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'adopt' cache: maven @@ -38,4 +38,4 @@ jobs: run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS -Dflink.version=${{ matrix.flink }} install -DskipTests - name: Tests for Flink ${{ matrix.flink }} - run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS -Dflink.version=${{ matrix.flink }} test + run: mvn $MAVEN_CLI_OPTS $JAVA_ADDITIONAL_OPTS -Dflink.version=${{ matrix.flink }} verify diff --git a/.github/workflows/prepare-release-branch.yml b/.github/workflows/prepare-release-branch.yml index d62872e..845e9da 100644 --- a/.github/workflows/prepare-release-branch.yml +++ b/.github/workflows/prepare-release-branch.yml @@ -19,10 +19,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'adopt' cache: maven diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3ef22b..ae0a7c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -24,10 +24,10 @@ jobs: - name: Check release tag match # ... and fail fast if they do not run: diff <(echo "${{ github.ref_name }}") <(echo "$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)") - - name: Set up JDK 8 + - name: Set up JDK 11 uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'adopt' cache: maven @@ -40,7 +40,7 @@ jobs: - name: Set up Apache Maven Central uses: actions/setup-java@v3 with: - java-version: '8' + java-version: '11' distribution: 'adopt' server-id: ossrh server-username: SONATYPE_USERNAME diff --git a/pom.xml b/pom.xml index 93cf079..aee76e4 100644 --- a/pom.xml +++ b/pom.xml @@ -36,8 +36,8 @@ - 8 - 8 + 11 + 11 2.12 UTF-8 @@ -58,7 +58,9 @@ 3.23.1 5.9.1 + 1.3.5 2.21.0 + 2.0.4 1.18.2 @@ -242,6 +244,26 @@ test + + + ch.qos.logback + logback-core + ${logback.version} + test + + + org.slf4j + slf4j-api + ${slf4j-api.version} + test + + + ch.qos.logback + logback-classic + ${logback.version} + test + + org.apache.flink diff --git a/src/test/java/com/getindata/flink/connector/jdbc/testutils/databases/elasticsearch/ElasticsearchDatabase.java b/src/test/java/com/getindata/flink/connector/jdbc/testutils/databases/elasticsearch/ElasticsearchDatabase.java index e955086..31b1305 100644 --- a/src/test/java/com/getindata/flink/connector/jdbc/testutils/databases/elasticsearch/ElasticsearchDatabase.java +++ b/src/test/java/com/getindata/flink/connector/jdbc/testutils/databases/elasticsearch/ElasticsearchDatabase.java @@ -21,13 +21,15 @@ import org.apache.flink.connector.jdbc.testutils.DatabaseExtension; import org.apache.flink.connector.jdbc.testutils.DatabaseMetadata; import org.apache.flink.util.FlinkRuntimeException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testcontainers.containers.output.Slf4jLogConsumer; import org.testcontainers.containers.wait.strategy.Wait; import org.testcontainers.elasticsearch.ElasticsearchContainer; import java.time.Duration; import static com.getindata.flink.connector.jdbc.testutils.databases.elasticsearch.ElasticsearchMetadata.PASSWORD; -import static com.getindata.flink.connector.jdbc.testutils.databases.elasticsearch.ElasticsearchMetadata.USERNAME; /** @@ -35,13 +37,10 @@ */ public class ElasticsearchDatabase extends DatabaseExtension implements ElasticsearchImages { - private static final ElasticsearchContainer CONTAINER = - new ElasticsearchContainer(ELASTICSEARCH_8) - .waitingFor( - Wait.forHttp("/_license") - .withBasicCredentials(USERNAME, PASSWORD) - .withReadTimeout(Duration.ofSeconds(5)) - .withStartupTimeout(Duration.ofMinutes(5))); + private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchDatabase.class); + private static final ElasticsearchContainer CONTAINER = new ElasticsearchContainer(ELASTICSEARCH_8) + .waitingFor(Wait.forLogMessage(".*license mode is .*", 1)) + .withLogConsumer(new Slf4jLogConsumer(LOGGER)); private static ElasticsearchMetadata metadata; private static ElasticsearchRestClient client; diff --git a/src/test/resources/logback-test.xml b/src/test/resources/logback-test.xml new file mode 100644 index 0000000..75a22c7 --- /dev/null +++ b/src/test/resources/logback-test.xml @@ -0,0 +1,19 @@ + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n + + + + + + + + + + + + + + + \ No newline at end of file