From 83d9c6ee2a8b4ac8646f29f5046d78c1149ec858 Mon Sep 17 00:00:00 2001 From: Krzysztof Sobolewski Date: Tue, 12 Sep 2023 17:36:28 +0200 Subject: [PATCH] Use uniform Assertions AssertJ class According to javadocs, the `AssertionsFor(Class|Interface)Types` were introduced to circumvent type inference issues with generic classes in Java 8. But it seems that we don't have these issues in our code base, so it looks like importing from these classes was just a mistake. --- .../java/io/trino/spiller/TestFileSingleStreamSpiller.java | 2 +- .../src/test/java/io/trino/hdfs/s3/TestS3HadoopPaths.java | 2 +- .../test/java/io/trino/hive/formats/TestHiveFormatUtils.java | 2 +- .../test/java/io/trino/hive/formats/avro/TestAvroBase.java | 4 ++-- .../TestAvroPageDataReaderWithAvroNativeTypeManagement.java | 2 +- .../avro/TestAvroPageDataReaderWithoutTypeManager.java | 2 +- .../avro/TestAvroPageDataWriterWithoutTypeManager.java | 2 +- .../io/trino/hive/formats/avro/TestLongFromBigEndian.java | 4 ++-- .../test/java/io/trino/hive/formats/line/TestLineBuffer.java | 4 ++-- .../formats/line/sequence/TestSequenceFileReaderWriter.java | 2 +- .../test/java/io/trino/hive/formats/rcfile/RcFileTester.java | 2 +- .../io/trino/parquet/reader/TestParquetReaderMemoryUsage.java | 2 +- .../column/values/dictionary/TestDictionaryWriter.java | 2 +- .../io/trino/plugin/base/logging/TestFormatInterpolator.java | 2 +- .../io/trino/plugin/jdbc/TestReusableConnectionFactory.java | 2 +- .../io/trino/plugin/bigquery/TestStaticCredentialsConfig.java | 2 +- .../trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java | 2 +- .../java/io/trino/plugin/deltalake/TestDeltaLakeMetadata.java | 4 ++-- .../deltalake/expression/TestSparkExpressionParser.java | 2 +- .../deltalake/transactionlog/TestDeltaLakeSchemaSupport.java | 2 +- .../plugin/deltalake/transactionlog/TestProtocolEntry.java | 2 +- .../java/io/trino/plugin/hive/orc/TestOrcWriterOptions.java | 4 ++-- .../java/io/trino/plugin/hive/util/TestAcidBucketCodec.java | 2 +- .../java/io/trino/plugin/hive/util/TestHiveBucketing.java | 2 +- .../java/io/trino/plugin/iceberg/TestIcebergBucketing.java | 2 +- .../java/io/trino/plugin/iceberg/TestPartitionFields.java | 2 +- .../java/io/trino/plugin/kudu/TestKuduKerberosConfig.java | 2 +- .../redis/TestMinimalFunctionalityWithoutKeyPrefix.java | 2 +- .../sqlserver/BaseSqlServerTransactionIsolationTest.java | 2 +- .../trino/tests/product/launcher/util/TestConsoleTable.java | 2 +- .../product/deltalake/TestHiveAndDeltaLakeCompatibility.java | 2 +- .../java/io/trino/tests/product/jdbc/TestLdapTrinoJdbc.java | 2 +- 32 files changed, 37 insertions(+), 37 deletions(-) diff --git a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java index 7aafebd8c5d6..e6b9dc5479a6 100644 --- a/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java +++ b/core/trino-main/src/test/java/io/trino/spiller/TestFileSingleStreamSpiller.java @@ -48,7 +48,7 @@ import static io.trino.spi.type.VarbinaryType.VARBINARY; import static java.nio.file.Files.newInputStream; import static java.util.concurrent.Executors.newCachedThreadPool; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-hdfs/src/test/java/io/trino/hdfs/s3/TestS3HadoopPaths.java b/lib/trino-hdfs/src/test/java/io/trino/hdfs/s3/TestS3HadoopPaths.java index be471cf02f42..ebe58f55889b 100644 --- a/lib/trino-hdfs/src/test/java/io/trino/hdfs/s3/TestS3HadoopPaths.java +++ b/lib/trino-hdfs/src/test/java/io/trino/hdfs/s3/TestS3HadoopPaths.java @@ -20,7 +20,7 @@ import java.net.URI; import static io.trino.filesystem.hdfs.HadoopPaths.hadoopPath; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestS3HadoopPaths { diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/TestHiveFormatUtils.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/TestHiveFormatUtils.java index 81dc7f1e4e64..8755a3103ce6 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/TestHiveFormatUtils.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/TestHiveFormatUtils.java @@ -18,7 +18,7 @@ import java.time.LocalDate; import static io.trino.hive.formats.HiveFormatUtils.parseHiveDate; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestHiveFormatUtils { diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroBase.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroBase.java index 01b3d38ce9e5..54c903529665 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroBase.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroBase.java @@ -82,8 +82,8 @@ import static io.trino.spi.type.VarcharType.VARCHAR; import static java.lang.Double.doubleToLongBits; import static java.lang.Float.floatToIntBits; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.within; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.within; public abstract class TestAvroBase { diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithAvroNativeTypeManagement.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithAvroNativeTypeManagement.java index a0e356491128..e7bb60e8eb50 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithAvroNativeTypeManagement.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithAvroNativeTypeManagement.java @@ -56,7 +56,7 @@ import static io.trino.hive.formats.avro.NativeLogicalTypesAvroTypeManager.UUID_SCHEMA; import static io.trino.hive.formats.avro.NativeLogicalTypesAvroTypeManager.padBigEndianToSize; import static io.trino.spi.type.Decimals.MAX_SHORT_PRECISION; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestAvroPageDataReaderWithAvroNativeTypeManagement extends TestAvroBase diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithoutTypeManager.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithoutTypeManager.java index a0a38fcbda6b..1c62f57165ca 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithoutTypeManager.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataReaderWithoutTypeManager.java @@ -45,7 +45,7 @@ import static io.trino.block.BlockAssertions.createStringsBlock; import static io.trino.spi.type.IntegerType.INTEGER; import static io.trino.spi.type.VarcharType.VARCHAR; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestAvroPageDataReaderWithoutTypeManager extends TestAvroBase diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataWriterWithoutTypeManager.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataWriterWithoutTypeManager.java index d71530c5e53d..784bb9cc99f5 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataWriterWithoutTypeManager.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestAvroPageDataWriterWithoutTypeManager.java @@ -45,7 +45,7 @@ import static io.trino.spi.type.SmallintType.SMALLINT; import static io.trino.spi.type.TinyintType.TINYINT; import static io.trino.spi.type.VarcharType.VARCHAR; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestAvroPageDataWriterWithoutTypeManager extends TestAvroBase diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestLongFromBigEndian.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestLongFromBigEndian.java index a68d81ffab02..7ab536ddb09a 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestLongFromBigEndian.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/avro/TestLongFromBigEndian.java @@ -23,8 +23,8 @@ import static io.trino.hive.formats.avro.NativeLogicalTypesAvroTypeManager.fitBigEndianValueToByteArraySize; import static io.trino.hive.formats.avro.NativeLogicalTypesAvroTypeManager.fromBigEndian; import static io.trino.hive.formats.avro.NativeLogicalTypesAvroTypeManager.padBigEndianToSize; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestLongFromBigEndian { diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/TestLineBuffer.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/TestLineBuffer.java index 9d2f1dd904e6..0a8140adc0a6 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/TestLineBuffer.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/TestLineBuffer.java @@ -24,8 +24,8 @@ import static io.airlift.slice.SizeOf.sizeOf; import static java.lang.Math.min; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestLineBuffer { diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/sequence/TestSequenceFileReaderWriter.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/sequence/TestSequenceFileReaderWriter.java index a3433bff0b3c..048ce6a18e2f 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/sequence/TestSequenceFileReaderWriter.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/line/sequence/TestSequenceFileReaderWriter.java @@ -60,7 +60,7 @@ import static org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.COMPRESS_CODEC; import static org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.COMPRESS_TYPE; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/rcfile/RcFileTester.java b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/rcfile/RcFileTester.java index 77c344397923..c47ffbaf3602 100644 --- a/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/rcfile/RcFileTester.java +++ b/lib/trino-hive-formats/src/test/java/io/trino/hive/formats/rcfile/RcFileTester.java @@ -110,7 +110,7 @@ import static org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory.getStandardStructObjectInspector; import static org.apache.hadoop.mapred.Reporter.NULL; import static org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.COMPRESS_CODEC; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestParquetReaderMemoryUsage.java b/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestParquetReaderMemoryUsage.java index 6af6b62957d4..8ade0d3cbfbe 100644 --- a/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestParquetReaderMemoryUsage.java +++ b/lib/trino-parquet/src/test/java/io/trino/parquet/reader/TestParquetReaderMemoryUsage.java @@ -35,7 +35,7 @@ import static io.trino.parquet.ParquetTestUtils.writeParquetFile; import static io.trino.spi.type.BigintType.BIGINT; import static io.trino.spi.type.IntegerType.INTEGER; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestParquetReaderMemoryUsage { diff --git a/lib/trino-parquet/src/test/java/org/apache/parquet/column/values/dictionary/TestDictionaryWriter.java b/lib/trino-parquet/src/test/java/org/apache/parquet/column/values/dictionary/TestDictionaryWriter.java index bc0e1ac50e98..06afb635a310 100644 --- a/lib/trino-parquet/src/test/java/org/apache/parquet/column/values/dictionary/TestDictionaryWriter.java +++ b/lib/trino-parquet/src/test/java/org/apache/parquet/column/values/dictionary/TestDictionaryWriter.java @@ -46,7 +46,7 @@ import static io.trino.parquet.reader.flat.LongColumnAdapter.LONG_ADAPTER; import static org.apache.parquet.column.Encoding.PLAIN; import static org.apache.parquet.column.Encoding.PLAIN_DICTIONARY; -import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestDictionaryWriter { diff --git a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/logging/TestFormatInterpolator.java b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/logging/TestFormatInterpolator.java index e801a29c69b9..561777bbbde4 100644 --- a/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/logging/TestFormatInterpolator.java +++ b/lib/trino-plugin-toolkit/src/test/java/io/trino/plugin/base/logging/TestFormatInterpolator.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static org.assertj.core.api.AssertionsForInterfaceTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; diff --git a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestReusableConnectionFactory.java b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestReusableConnectionFactory.java index 14a045561ea2..9f8fa21dbd27 100644 --- a/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestReusableConnectionFactory.java +++ b/plugin/trino-base-jdbc/src/test/java/io/trino/plugin/jdbc/TestReusableConnectionFactory.java @@ -24,7 +24,7 @@ import static com.google.common.base.Preconditions.checkState; import static java.lang.Thread.sleep; import static java.util.Objects.requireNonNull; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestReusableConnectionFactory { diff --git a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestStaticCredentialsConfig.java b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestStaticCredentialsConfig.java index 44515758d0fa..185456d4f281 100644 --- a/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestStaticCredentialsConfig.java +++ b/plugin/trino-bigquery/src/test/java/io/trino/plugin/bigquery/TestStaticCredentialsConfig.java @@ -26,7 +26,7 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; import static org.testng.Assert.fail; diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java index 7a09e6bcac5d..4021d6430f3e 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/BaseDeltaFailureRecoveryTest.java @@ -26,7 +26,7 @@ import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_GET_RESULTS_REQUEST_TIMEOUT; import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_MANAGEMENT_REQUEST_FAILURE; import static io.trino.execution.FailureInjector.InjectedFailureType.TASK_MANAGEMENT_REQUEST_TIMEOUT; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public abstract class BaseDeltaFailureRecoveryTest extends BaseFailureRecoveryTest diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeMetadata.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeMetadata.java index 4a1512fe9c00..99c1e9afd2bf 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeMetadata.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/TestDeltaLakeMetadata.java @@ -94,8 +94,8 @@ import static io.trino.spi.type.TimestampType.TIMESTAMP_MILLIS; import static java.nio.file.Files.createTempDirectory; import static java.util.Locale.ENGLISH; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestDeltaLakeMetadata { diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/expression/TestSparkExpressionParser.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/expression/TestSparkExpressionParser.java index a506ce62aad6..1be4912cb8eb 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/expression/TestSparkExpressionParser.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/expression/TestSparkExpressionParser.java @@ -18,7 +18,7 @@ import org.testng.annotations.Test; import static io.trino.plugin.deltalake.expression.SparkExpressionParser.createExpression; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestSparkExpressionParser 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 94fa7646a684..2e83bb176577 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 @@ -69,7 +69,7 @@ import static io.trino.type.IntervalDayTimeType.INTERVAL_DAY_TIME; import static io.trino.type.IntervalYearMonthType.INTERVAL_YEAR_MONTH; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatCode; +import static org.assertj.core.api.Assertions.assertThatCode; import static org.testng.Assert.assertEquals; public class TestDeltaLakeSchemaSupport diff --git a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestProtocolEntry.java b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestProtocolEntry.java index eaa114aaea36..c221e737a0ef 100644 --- a/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestProtocolEntry.java +++ b/plugin/trino-delta-lake/src/test/java/io/trino/plugin/deltalake/transactionlog/TestProtocolEntry.java @@ -20,7 +20,7 @@ import java.util.Optional; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestProtocolEntry diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcWriterOptions.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcWriterOptions.java index a6b71af7b07a..b986a86ac67d 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcWriterOptions.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/orc/TestOrcWriterOptions.java @@ -27,8 +27,8 @@ import static io.trino.plugin.hive.HiveMetadata.ORC_BLOOM_FILTER_COLUMNS_KEY; import static io.trino.plugin.hive.HiveMetadata.ORC_BLOOM_FILTER_FPP_KEY; import static io.trino.plugin.hive.util.HiveUtil.getOrcWriterOptions; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestOrcWriterOptions { diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAcidBucketCodec.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAcidBucketCodec.java index 5629f99ea751..419638718df3 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAcidBucketCodec.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestAcidBucketCodec.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestAcidBucketCodec diff --git a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java index 1123e5a818b1..09218ab0ac1a 100644 --- a/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java +++ b/plugin/trino-hive/src/test/java/io/trino/plugin/hive/util/TestHiveBucketing.java @@ -54,7 +54,7 @@ import static java.util.Map.Entry; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo; import static org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfoFromTypeString; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestHiveBucketing diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergBucketing.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergBucketing.java index b9902e821509..7e838208c6cc 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergBucketing.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestIcebergBucketing.java @@ -69,7 +69,7 @@ import static java.lang.String.format; import static java.time.ZoneOffset.UTC; import static org.apache.iceberg.types.Type.TypeID.DECIMAL; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestIcebergBucketing diff --git a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java index 4deb541c1259..9f5c78494102 100644 --- a/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java +++ b/plugin/trino-iceberg/src/test/java/io/trino/plugin/iceberg/TestPartitionFields.java @@ -29,7 +29,7 @@ import static com.google.common.collect.Iterables.getOnlyElement; import static io.trino.plugin.iceberg.PartitionFields.parsePartitionField; import static io.trino.plugin.iceberg.PartitionFields.toPartitionFields; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.testng.Assert.assertEquals; public class TestPartitionFields diff --git a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduKerberosConfig.java b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduKerberosConfig.java index 9f34d4e2a1f1..7e006d19d233 100644 --- a/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduKerberosConfig.java +++ b/plugin/trino-kudu/src/test/java/io/trino/plugin/kudu/TestKuduKerberosConfig.java @@ -26,7 +26,7 @@ import static io.airlift.configuration.testing.ConfigAssertions.assertRecordedDefaults; import static io.airlift.configuration.testing.ConfigAssertions.recordDefaults; import static java.nio.file.Files.createTempFile; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestKuduKerberosConfig { diff --git a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionalityWithoutKeyPrefix.java b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionalityWithoutKeyPrefix.java index b565400a86d3..d6297e694947 100644 --- a/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionalityWithoutKeyPrefix.java +++ b/plugin/trino-redis/src/test/java/io/trino/plugin/redis/TestMinimalFunctionalityWithoutKeyPrefix.java @@ -20,7 +20,7 @@ import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; @Test(singleThreaded = true) public class TestMinimalFunctionalityWithoutKeyPrefix diff --git a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/BaseSqlServerTransactionIsolationTest.java b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/BaseSqlServerTransactionIsolationTest.java index 57032b250ebe..859371798c1d 100644 --- a/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/BaseSqlServerTransactionIsolationTest.java +++ b/plugin/trino-sqlserver/src/test/java/io/trino/plugin/sqlserver/BaseSqlServerTransactionIsolationTest.java @@ -25,7 +25,7 @@ import static io.trino.plugin.sqlserver.SqlServerQueryRunner.createSqlServerQueryRunner; import static io.trino.spi.type.VarcharType.VARCHAR; import static io.trino.tpch.TpchTable.NATION; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public abstract class BaseSqlServerTransactionIsolationTest extends AbstractTestQueryFramework diff --git a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/util/TestConsoleTable.java b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/util/TestConsoleTable.java index dbdca3d1a31c..99170caa82fe 100644 --- a/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/util/TestConsoleTable.java +++ b/testing/trino-product-tests-launcher/src/test/java/io/trino/tests/product/launcher/util/TestConsoleTable.java @@ -15,7 +15,7 @@ import org.testng.annotations.Test; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.assertj.core.api.Assertions.assertThat; public class TestConsoleTable { diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java index 22e1f714c93f..a561939242c0 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/deltalake/TestHiveAndDeltaLakeCompatibility.java @@ -25,7 +25,7 @@ import static io.trino.tests.product.utils.QueryExecutors.onTrino; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** * @see TestIcebergHiveViewsCompatibility diff --git a/testing/trino-product-tests/src/main/java/io/trino/tests/product/jdbc/TestLdapTrinoJdbc.java b/testing/trino-product-tests/src/main/java/io/trino/tests/product/jdbc/TestLdapTrinoJdbc.java index 3e3f333154ab..27dc54b088e2 100644 --- a/testing/trino-product-tests/src/main/java/io/trino/tests/product/jdbc/TestLdapTrinoJdbc.java +++ b/testing/trino-product-tests/src/main/java/io/trino/tests/product/jdbc/TestLdapTrinoJdbc.java @@ -35,7 +35,7 @@ import static io.trino.tests.product.TpchTableResults.PRESTO_NATION_RESULT; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.AssertionsForClassTypes.assertThatThrownBy; +import static org.assertj.core.api.Assertions.assertThatThrownBy; public class TestLdapTrinoJdbc extends BaseLdapJdbcTest