From 2ce8ca8aaea8c9a9453ab1afdb3b4d0751f4e8ea Mon Sep 17 00:00:00 2001 From: ismail simsek <6005685+ismailsimsek@users.noreply.github.com> Date: Wed, 18 Dec 2024 13:08:36 +0100 Subject: [PATCH] Replace WithTestResource to QuarkusTestResource --- .../server/iceberg/IcebergChangeConsumerMangodbTest.java | 6 +++--- .../server/iceberg/IcebergChangeConsumerMysqlTest.java | 6 +++--- .../iceberg/IcebergChangeConsumerMysqlTestUnwrapped.java | 6 +++--- .../debezium/server/iceberg/IcebergChangeConsumerTest.java | 6 +++--- .../server/iceberg/IcebergChangeConsumerTestUnwraapped.java | 6 +++--- .../IcebergChangeConsumerUpsertDeleteDeletesTest.java | 4 ++-- .../server/iceberg/IcebergChangeConsumerUpsertTest.java | 6 +++--- .../server/iceberg/IcebergEventsChangeConsumerTest.java | 6 +++--- .../server/iceberg/batchsizewait/MaxBatchSizeWaitTest.java | 6 +++--- .../server/iceberg/history/IcebergSchemaHistoryTest.java | 6 +++--- .../iceberg/offset/IcebergOffsetBackingStoreTest.java | 4 ++-- .../iceberg/tableoperator/IcebergTableOperatorTest.java | 6 +++--- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMangodbTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMangodbTest.java index 196c79f4..1ebcb6e6 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMangodbTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMangodbTest.java @@ -11,7 +11,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourceMangoDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -29,8 +29,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourceMangoDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourceMangoDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerMangodbTest.TestProfile.class) public class IcebergChangeConsumerMangodbTest extends BaseSparkTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTest.java index a5794b38..2054a4ec 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTest.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.BaseTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourceMysqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -29,8 +29,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourceMysqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourceMysqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerMysqlTest.TestProfile.class) public class IcebergChangeConsumerMysqlTest extends BaseTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTestUnwrapped.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTestUnwrapped.java index eee35347..2d3fb0cd 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTestUnwrapped.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerMysqlTestUnwrapped.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.BaseTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourceMysqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -32,8 +32,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourceMysqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourceMysqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerMysqlTestUnwrapped.TestProfile.class) public class IcebergChangeConsumerMysqlTestUnwrapped extends BaseTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTest.java index 45fcc466..3016a851 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTest.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -42,8 +42,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourcePostgresqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerTest.TestProfile.class) public class IcebergChangeConsumerTest extends BaseSparkTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTestUnwraapped.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTestUnwraapped.java index 31b3768d..79fa360c 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTestUnwraapped.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerTestUnwraapped.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -36,8 +36,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourcePostgresqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerTestUnwraapped.TestProfile.class) public class IcebergChangeConsumerTestUnwraapped extends BaseSparkTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertDeleteDeletesTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertDeleteDeletesTest.java index 5208f0ea..ea9db649 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertDeleteDeletesTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertDeleteDeletesTest.java @@ -11,7 +11,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.TestUtil; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -31,7 +31,7 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerUpsertDeleteDeletesTest.TestProfile.class) public class IcebergChangeConsumerUpsertDeleteDeletesTest extends BaseSparkTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertTest.java index 439dc2df..086590f3 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergChangeConsumerUpsertTest.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; import io.debezium.server.iceberg.testresources.TestUtil; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -35,8 +35,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourcePostgresqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergChangeConsumerUpsertTest.TestProfile.class) public class IcebergChangeConsumerUpsertTest extends BaseSparkTest { diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergEventsChangeConsumerTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergEventsChangeConsumerTest.java index 23127594..b670ce50 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergEventsChangeConsumerTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/IcebergEventsChangeConsumerTest.java @@ -11,7 +11,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourceMysqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -31,8 +31,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourceMysqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourceMysqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergEventsChangeConsumerTest.TestProfile.class) public class IcebergEventsChangeConsumerTest extends BaseSparkTest { @ConfigProperty(name = "debezium.sink.type") diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/batchsizewait/MaxBatchSizeWaitTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/batchsizewait/MaxBatchSizeWaitTest.java index a64e245b..7788d6c2 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/batchsizewait/MaxBatchSizeWaitTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/batchsizewait/MaxBatchSizeWaitTest.java @@ -11,7 +11,7 @@ import io.debezium.server.iceberg.testresources.BaseSparkTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -28,8 +28,8 @@ @QuarkusTest @TestProfile(MaxBatchSizeWaitTest.TestProfile.class) -@WithTestResource(value = SourcePostgresqlDB.class) -@WithTestResource(value = S3Minio.class) +@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) class MaxBatchSizeWaitTest extends BaseSparkTest { @Inject MaxBatchSizeWait waitBatchSize; diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/history/IcebergSchemaHistoryTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/history/IcebergSchemaHistoryTest.java index eaa01644..708a1911 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/history/IcebergSchemaHistoryTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/history/IcebergSchemaHistoryTest.java @@ -12,7 +12,7 @@ import io.debezium.server.iceberg.testresources.BaseTest; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourceMysqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.quarkus.test.junit.QuarkusTestProfile; import io.quarkus.test.junit.TestProfile; @@ -32,8 +32,8 @@ */ @QuarkusTest @Disabled // @TODO remove spark with antlr4 version -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourceMysqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourceMysqlDB.class, restrictToAnnotatedClass = true) @TestProfile(IcebergSchemaHistoryTest.TestProfile.class) public class IcebergSchemaHistoryTest extends BaseTest { @Test diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/offset/IcebergOffsetBackingStoreTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/offset/IcebergOffsetBackingStoreTest.java index da86197b..f49bcc6b 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/offset/IcebergOffsetBackingStoreTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/offset/IcebergOffsetBackingStoreTest.java @@ -11,7 +11,7 @@ import com.google.common.collect.Lists; import io.debezium.server.iceberg.testresources.BaseTest; import io.debezium.server.iceberg.testresources.S3Minio; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import org.apache.iceberg.catalog.TableIdentifier; import org.apache.iceberg.data.Record; @@ -36,7 +36,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; @QuarkusTest -@WithTestResource(value = S3Minio.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) public class IcebergOffsetBackingStoreTest extends BaseTest { private static final Map firstSet = new HashMap<>(); diff --git a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/tableoperator/IcebergTableOperatorTest.java b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/tableoperator/IcebergTableOperatorTest.java index 785bcdc1..609d9161 100644 --- a/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/tableoperator/IcebergTableOperatorTest.java +++ b/debezium-server-iceberg-sink/src/test/java/io/debezium/server/iceberg/tableoperator/IcebergTableOperatorTest.java @@ -15,7 +15,7 @@ import io.debezium.server.iceberg.testresources.IcebergChangeEventBuilder; import io.debezium.server.iceberg.testresources.S3Minio; import io.debezium.server.iceberg.testresources.SourcePostgresqlDB; -import io.quarkus.test.common.WithTestResource; +import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import jakarta.inject.Inject; import org.apache.iceberg.Table; @@ -39,8 +39,8 @@ * @author Ismail Simsek */ @QuarkusTest -@WithTestResource(value = S3Minio.class) -@WithTestResource(value = SourcePostgresqlDB.class) +@QuarkusTestResource(value = S3Minio.class, restrictToAnnotatedClass = true) +@QuarkusTestResource(value = SourcePostgresqlDB.class, restrictToAnnotatedClass = true) class IcebergTableOperatorTest extends BaseSparkTest { static String testTable = "inventory.test_table_operator";