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 20, 2024
1 parent 295ae5a commit 09f56e2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 27 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
6 changes: 3 additions & 3 deletions sdks/python/apache_beam/yaml/generate_yaml_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def add_transform_links(transform, description, provider_list):
meanwhile,
```
- type: MyTransform
config:
...
- type: MyTransform
config:
...
```
Would remain unchanged.
Expand Down

0 comments on commit 09f56e2

Please sign in to comment.