Skip to content

Commit 823be81

Browse files
authored
Merge pull request #1627 from ClickHouse/fix_test_cleanup
Cleanup after Tests!
2 parents 6a4ffc4 + 1cf1629 commit 823be81

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

clickhouse-jdbc/src/test/java/com/clickhouse/jdbc/ClickHousePreparedStatementTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,7 @@ public void testOutFileAndInFile() throws SQLException {
13291329
if (f.exists()) {
13301330
f.delete();
13311331
}
1332+
f.deleteOnExit();
13321333
try (ClickHouseConnection conn = newConnection(props); Statement s = conn.createStatement()) {
13331334
s.execute("drop table if exists test_load_infile_with_params;"
13341335
+ "create table test_load_infile_with_params(n Int32, s String) engine=Memory");

clickhouse-jdbc/src/test/java/com/clickhouse/jdbc/ClickHouseStatementTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ public void testOutFileAndInFile() throws SQLException {
174174
if (f1.exists()) {
175175
f1.delete();
176176
}
177+
f1.deleteOnExit();
177178
File f2 = new File("a2.csv");
178179
if (f2.exists()) {
179180
f2.delete();
180181
}
182+
f2.deleteOnExit();
181183

182184
try (ClickHouseConnection conn = newConnection(props)) {
183185
String sql1 = "select number n, toString(n) from numbers(1234) into outfile '" + f1.getName() + "'";

0 commit comments

Comments
 (0)