Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Kinard <jeff@thekinards.com>
  • Loading branch information
Polber committed Dec 26, 2024
1 parent c93df87 commit bb28a32
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 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
12 changes: 6 additions & 6 deletions sdks/python/apache_beam/yaml/generate_yaml_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,12 @@ def add_transform_links(transform, description, provider_list):
would be converted to
"Some description talking about <a href="#mytransform">MyTransform</a>"
meanwhile,
```
- type: MyTransform
config:
...
```
meanwhile::
type: MyTransform
config:
...
Would remain unchanged.
Avoid self-linking within a Transform page.
Expand Down

0 comments on commit bb28a32

Please sign in to comment.