diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeCreateTableStatistics.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeCreateTableStatistics.java index 2a8724210376..d05d12edce43 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeCreateTableStatistics.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeCreateTableStatistics.java @@ -26,7 +26,7 @@ import io.trino.testing.AbstractTestQueryFramework; import io.trino.testing.DistributedQueryRunner; import io.trino.testing.QueryRunner; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.math.BigDecimal; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeFileOperations.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeFileOperations.java index a71e2fcb8099..2c0bb2322b5c 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeFileOperations.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeFileOperations.java @@ -26,7 +26,9 @@ import io.trino.testing.AbstractTestQueryFramework; import io.trino.testing.DistributedQueryRunner; import org.intellij.lang.annotations.Language; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Execution; +import org.junit.jupiter.api.parallel.ExecutionMode; import java.io.File; import java.net.URI; @@ -65,7 +67,7 @@ import static java.util.stream.Collectors.toCollection; // single-threaded AccessTrackingFileSystemFactory is shared mutable state -@Test(singleThreaded = true) +@Execution(ExecutionMode.SAME_THREAD) public class TestDeltaLakeFileOperations extends AbstractTestQueryFramework { diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestReadJsonTransactionLog.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestReadJsonTransactionLog.java index d28e942dc5c9..3d87f04b4904 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestReadJsonTransactionLog.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestReadJsonTransactionLog.java @@ -20,7 +20,7 @@ import io.trino.plugin.deltalake.transactionlog.DeltaLakeTransactionLogEntry; import io.trino.plugin.deltalake.transactionlog.RemoveFileEntry; import io.trino.plugin.deltalake.transactionlog.checkpoint.LastCheckpoint; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.IOException; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestSplitPruning.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestSplitPruning.java index b045dd952919..38cc4ed9cefb 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestSplitPruning.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestSplitPruning.java @@ -22,8 +22,9 @@ import io.trino.testing.MaterializedResult; import io.trino.testing.QueryRunner; import org.intellij.lang.annotations.Language; -import org.testng.annotations.BeforeClass; -import org.testng.annotations.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInstance; import java.util.Arrays; import java.util.List; @@ -35,8 +36,10 @@ import static io.trino.plugin.deltalake.DeltaLakeQueryRunner.createDeltaLakeQueryRunner; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.TestInstance.Lifecycle.PER_CLASS; import static org.testng.Assert.assertEquals; +@TestInstance(PER_CLASS) public class TestSplitPruning extends AbstractTestQueryFramework { @@ -62,7 +65,7 @@ protected QueryRunner createQueryRunner() return createDeltaLakeQueryRunner(DELTA_CATALOG, ImmutableMap.of(), ImmutableMap.of("delta.register-table-procedure.enabled", "true")); } - @BeforeClass + @BeforeAll public void registerTables() { for (String table : TABLES) { diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java index de8c929f5c55..281804f7bec3 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestTransactionLogAccess.java @@ -41,7 +41,8 @@ import io.trino.spi.type.IntegerType; import io.trino.spi.type.TypeManager; import io.trino.testing.TestingConnectorContext; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Execution; import java.io.File; import java.io.IOException; @@ -80,11 +81,12 @@ import static java.util.Objects.requireNonNull; import static java.util.stream.Collectors.toCollection; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.parallel.ExecutionMode.SAME_THREAD; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; -@Test(singleThreaded = true) // e.g. TrackingFileSystemFactory is shared mutable state +@Execution(SAME_THREAD) // e.g. TrackingFileSystemFactory is shared mutable state public class TestTransactionLogAccess { private static final Set EXPECTED_ADD_FILE_PATHS = ImmutableSet.of( diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestDeltaLakeSchemaSupport.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestDeltaLakeSchemaSupport.java index c4f324d7eaa9..f0924f859ed5 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestDeltaLakeSchemaSupport.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestDeltaLakeSchemaSupport.java @@ -30,7 +30,7 @@ import io.trino.spi.type.RowType; import io.trino.spi.type.TypeOperators; import io.trino.spi.type.VarcharType; -import org.testng.annotations.Test; +import org.junit.jupiter.api.Test; import java.io.IOException; import java.net.URISyntaxException;