Skip to content

Commit

Permalink
Close database when checking connection
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliren committed Jan 7, 2022
1 parent 7b71fef commit 6b5d420
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ public AirbyteConnectionStatus check(final JsonNode config) {
.withMessage("Could not connect to the staging persistence with the provided configuration. \n" + e.getMessage());
}

try {
try (final JdbcDatabase database = getDatabase(config)) {
final var nameTransformer = getNameTransformer();
final var outputSchema = nameTransformer.convertStreamName(config.get(schemaFieldName).asText());
final JdbcDatabase database = getDatabase(config);
AbstractJdbcDestination.attemptSQLCreateAndDropTableOperations(outputSchema, database, nameTransformer, getSqlOperations());

return new AirbyteConnectionStatus().withStatus(AirbyteConnectionStatus.Status.SUCCEEDED);
Expand Down

0 comments on commit 6b5d420

Please sign in to comment.