Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <[email protected]>
  • Loading branch information
Polber committed Dec 4, 2024
1 parent fd7b354 commit 8068378
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ public abstract static class JdbcWriteSchemaTransformConfiguration implements Se
public abstract String getWriteStatement();

public void validate() {
validate("JDBC");
validate("");
}

public void validate(String jdbcType) throws IllegalArgumentException {
Expand All @@ -360,7 +360,8 @@ public void validate(String jdbcType) throws IllegalArgumentException {
}
if (jdbcTypePresent
&& !JDBC_DRIVER_MAP.containsKey(Objects.requireNonNull(jdbcType).toLowerCase())) {
throw new IllegalArgumentException("JDBC type must be one of " + JDBC_DRIVER_MAP.keySet());
throw new IllegalArgumentException(
"JDBC type must be one of " + JDBC_DRIVER_MAP.keySet() + " but was " + jdbcType);
}

boolean writeStatementPresent =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,6 @@ public void testInvalidReadSchemaOptions() {
.build()
.validate();
});
assertThrows(
IllegalArgumentException.class,
() -> {
JdbcReadSchemaTransformProvider.JdbcReadSchemaTransformConfiguration.builder()
.setJdbcUrl("JdbcUrl")
.setLocation("Location")
.setDriverClassName("ClassName")
.setJdbcType((String) JDBC_DRIVER_MAP.keySet().toArray()[0])
.build()
.validate();
});
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,17 +122,6 @@ public void testInvalidWriteSchemaOptions() {
.build()
.validate();
});
assertThrows(
IllegalArgumentException.class,
() -> {
JdbcWriteSchemaTransformProvider.JdbcWriteSchemaTransformConfiguration.builder()
.setJdbcUrl("JdbcUrl")
.setLocation("Location")
.setDriverClassName("ClassName")
.setJdbcType((String) JDBC_DRIVER_MAP.keySet().toArray()[0])
.build()
.validate();
});
}

@Test
Expand Down

0 comments on commit 8068378

Please sign in to comment.