Skip to content

Commit

Permalink
close conn
Browse files Browse the repository at this point in the history
  • Loading branch information
rayokota committed Jul 4, 2024
1 parent 282be3b commit eb8a572
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/io/kcache/kwack/KwackEngine.java
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,11 @@ public void close() throws IOException {
LOG.warn("Could not close cache for {}", key);
}
});
try {
conn.close();
} catch (SQLException e) {
LOG.warn("Could not close DuckDB connection for {}", config.getDbUrl());
}
resetSchemaRegistry(config.getSchemaRegistryUrls(), schemaRegistry);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ protected void injectKwackProperties(Properties props) {
props.put(KwackConfig.KAFKACACHE_BOOTSTRAP_SERVERS_CONFIG, bootstrapServers);
props.put(KwackConfig.KAFKACACHE_TOPIC_REPLICATION_FACTOR_CONFIG, 1);
props.put(KwackConfig.SCHEMA_REGISTRY_URL_CONFIG, MOCK_URL);
props.put(KwackConfig.DB_CONFIG, ":memory:?cache=private");
props.put(AbstractKafkaSchemaSerDeConfig.AUTO_REGISTER_SCHEMAS, "true");
}

Expand Down

0 comments on commit eb8a572

Please sign in to comment.