diff --git a/.github/workflows/pr-unit-tests-jdk17.yml b/.github/workflows/pr-unit-tests-jdk17.yml index 79a353f..8af7dc4 100644 --- a/.github/workflows/pr-unit-tests-jdk17.yml +++ b/.github/workflows/pr-unit-tests-jdk17.yml @@ -41,11 +41,15 @@ jobs: run: mvn -ntp -B spotbugs:check - name: unit test after build + run: mvn test -Pcloud -Dtest="!org.apache.pulsar.ecosystem.io.lakehouse.sink.hudi.HoodieTestS3Cloud" + + - name: cloud test after build + if: github.event_name == 'push' env: CLOUD_BUCKET_NAME: ${{ secrets.CLOUD_BUCKET_NAME }} AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} - run: mvn test -Pcloud + run: mvn test -Pcloud -Dtest='org.apache.pulsar.ecosystem.io.lakehouse.sink.hudi.HoodieTestS3Cloud' - name: package surefire artifacts if: failure() diff --git a/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieTestS3Cloud.java b/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieTestS3Cloud.java new file mode 100644 index 0000000..f92b77b --- /dev/null +++ b/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieTestS3Cloud.java @@ -0,0 +1,33 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.pulsar.ecosystem.io.lakehouse.sink.hudi; + +import org.testng.annotations.DataProvider; + +public class HoodieTestS3Cloud extends HoodieWriterTest { + + private static final String STORAGE_S3 = "S3"; + + @DataProvider(name = "storage") + public Object[][] storageType() { + return new Object[][]{ + {STORAGE_S3} + }; + } +} diff --git a/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieWriterTest.java b/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieWriterTest.java index 0b2e01c..bab0016 100644 --- a/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieWriterTest.java +++ b/src/test/java/org/apache/pulsar/ecosystem/io/lakehouse/sink/hudi/HoodieWriterTest.java @@ -67,8 +67,6 @@ public class HoodieWriterTest { private static final Path PROJECT_DATA = FileSystems.getDefault().getPath("data").toAbsolutePath(); private static final String STORAGE_LOCAL = "LOCAL"; - private static final String STORAGE_S3 = "S3"; - private static final String STORAGE_GCS = "GCS"; private URI testPath; private SinkConnectorConfig sinkConfig; @@ -76,8 +74,7 @@ public class HoodieWriterTest { @DataProvider(name = "storage") public Object[][] storageType() { return new Object[][]{ - {STORAGE_LOCAL}, - {STORAGE_S3} + {STORAGE_LOCAL} }; }