Skip to content

Commit

Permalink
[hotfix] Remove deprecated Assertj API usages
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Nov 2, 2022
1 parent 39f616e commit 2df4f53
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -809,8 +809,8 @@ void testJobSubmissionRespectsConfiguredRetryPolicy() throws Exception {
createRestClusterClient(serverAddress.getPort(), clientConfig)) {
assertThatThrownBy(() -> restClusterClient.submitJob(jobGraph).get())
.isInstanceOf(ExecutionException.class)
.getCause()
.getCause()
.cause()
.cause()
.isInstanceOf(FutureUtils.RetryException.class);

assertThat(failedRequest).hasValue(maxRetryAttempts + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void chainedFatalExceptionClassifierAcceptExceptionsOnTheLastItemOfChain(
assertThat(caughtException.get())
.isInstanceOf(RuntimeException.class)
.hasMessage("Buffer manipulation calculations resulted in a reference exception")
.getCause()
.cause()
.isInstanceOf(NullPointerException.class)
.hasMessage("Base NullPointerException");
}
Expand Down Expand Up @@ -131,7 +131,7 @@ private void assertThatCaughtExceptionIsWrappedArithmeticDivByZeroException(
assertThat(caughtException)
.isInstanceOf(RuntimeException.class)
.hasMessage("Buffer manipulation calculations resulted in a calculation exception")
.getCause()
.cause()
.isInstanceOf(ArithmeticException.class)
.hasMessage("Base arithmetic exception");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1287,7 +1287,7 @@ public void testUnsupportedOperation() {
private void verifyUnsupportedOperation(String ddl) {
assertThatThrownBy(() -> tableEnv.executeSql(ddl))
.isInstanceOf(ValidationException.class)
.getCause()
.cause()
.isInstanceOf(UnsupportedOperationException.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ void testInvalidJavaCode() {
@Test
public void testNullCode() {
assertThatThrownBy(() -> JavaCodeSplitter.split(null, 4000, 10000))
.getCause()
.cause()
.hasMessage("code cannot be empty");
}

@Test
public void testEmptyCode() {
assertThatThrownBy(() -> JavaCodeSplitter.split("", 4000, 10000))
.getCause()
.cause()
.hasMessage("code cannot be empty");
}

Expand All @@ -76,15 +76,15 @@ public void testWrongMaxMethodLength() {
() ->
JavaCodeSplitter.split(
"public interface DummyInterface {}", 0, 10000))
.getCause()
.cause()
.hasMessage("maxMethodLength must be greater than 0");
}

@Test
public void testWrongMaxClassMemberCount() {
assertThatThrownBy(
() -> JavaCodeSplitter.split("public interface DummyInterface {}", 10, 0))
.getCause()
.cause()
.hasMessage("maxClassMemberCount must be greater than 0");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void testFieldMappingLegacyDecimalTypeNotMatchingPrecision() {
"Type DECIMAL(38, 10) of table field 'f0' does not match with the "
+ "physical type LEGACY('DECIMAL', 'DECIMAL') of the "
+ "'f0' field of the TableSource return type.")
.getCause()
.cause()
.isInstanceOf(ValidationException.class)
.hasMessage("Legacy decimal type can only be mapped to DECIMAL(38, 18).");
}
Expand Down

0 comments on commit 2df4f53

Please sign in to comment.