[hotfix][table][tests] Replace ExpectedException with assertJ
authorMarios Trivyzas <matriv@gmail.com>
Mon, 28 Mar 2022 18:07:21 +0000 (21:07 +0300)
committerTimo Walther <twalthr@apache.org>
Mon, 9 May 2022 11:07:28 +0000 (13:07 +0200)
commit2ade17dc29716b04b0f59e59608316ca980de2e0
treec4775be1110955037ff8aeb5f834fa5dc94ef8c9
parent8a7a613909ae7c43f2839d11bc0ad1640329d1b0
[hotfix][table][tests] Replace ExpectedException with assertJ

Replace deprecated ExpectedException with assertJ's
`assertThatThrownBy` and improve certain assertions by asserting
the Exception class or the Exception message where missing.

This closes #19262.
31 files changed:
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/SqlClientTest.java
flink-table/flink-sql-client/src/test/java/org/apache/flink/table/client/gateway/local/LocalExecutorITCase.java
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/CreateTableLikeTest.java
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/api/TableConfigTest.java
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/expressions/ObjectToExpressionTest.java
flink-table/flink-table-api-java/src/test/java/org/apache/flink/table/operations/utils/ValuesOperationTreeBuilderTest.java
flink-table/flink-table-api-scala/src/test/scala/org/apache/flink/table/types/extraction/TypeInferenceExtractorScalaTest.scala
flink-table/flink-table-common/src/test/java/org/apache/flink/table/api/TableSchemaTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/api/constraints/UniqueConstraintTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/catalog/CatalogTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/expressions/ExpressionTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/factories/TableSinkFactoryServiceTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/LogicalTypeParserTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/extraction/DataTypeExtractorTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/types/extraction/TypeInferenceExtractorTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/utils/TableSchemaUtilsTest.java
flink-table/flink-table-common/src/test/java/org/apache/flink/table/utils/TypeMappingUtilsTest.java
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/MergeTableLikeUtilTest.java
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/TableSinkJsonPlanTest.java
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/nodes/exec/stream/TableSourceJsonPlanTest.java
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/utils/JsonPlanTestBase.java
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/api/TableITCase.scala
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/data/DataStructureConvertersTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/generated/CompileUtilsTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/window/WindowOperatorContractTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/window/assigners/CumulativeWindowAssignerTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/window/assigners/SlidingWindowAssignerTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/operators/window/assigners/TumblingWindowAssignerTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/types/DataTypePrecisionFixerTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/typeutils/RowDataSerializerTest.java
flink-table/flink-table-runtime/src/test/java/org/apache/flink/table/runtime/util/ResettableExternalBufferTest.java