Skip to content

Commit

Permalink
Add tests on default settings for autoload and autoinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
carlopi committed Jun 3, 2024
1 parent f771f4c commit 95673d0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/org/duckdb/TestDuckDBJDBC.java
Original file line number Diff line number Diff line change
Expand Up @@ -3228,6 +3228,26 @@ public static void test_boolean_config() throws Exception {
}
}

public static void test_autoloading_config() throws Exception {
Properties config = new Properties();
try (Connection conn = DriverManager.getConnection(JDBC_URL, config);
PreparedStatement stmt = conn.prepareStatement("SELECT current_setting('autoload_known_extensions')");
ResultSet rs = stmt.executeQuery()) {
rs.next();
assertEquals("true", rs.getString(1));
}
}

public static void test_autoinstall_config() throws Exception {
Properties config = new Properties();
try (Connection conn = DriverManager.getConnection(JDBC_URL, config);
PreparedStatement stmt = conn.prepareStatement("SELECT current_setting('autoinstall_known_extensions')");
ResultSet rs = stmt.executeQuery()) {
rs.next();
assertEquals("true", rs.getString(1));
}
}

public static void test_readonly_remains_bug5593() throws Exception {
Path database_file = Files.createTempFile("duckdb-instance-cache-test-", ".duckdb");
database_file.toFile().delete();
Expand Down

0 comments on commit 95673d0

Please sign in to comment.