Skip to content

Commit 257aa23

Browse files
committed
added more information for runQuery failure
1 parent f6b7569 commit 257aa23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clickhouse-client/src/test/java/com/clickhouse/client/BaseIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ protected boolean runQuery(String query) {
7979
}
8080

8181
protected boolean createDatabase(String dbName) {
82-
return ClickHouseServerForTest.runQuery("CREATE DATABASE IF NOT EXISTS " + dbName);
82+
return ClickHouseServerForTest.runQuery("CREATE DATABASE IF NOT EXISTS `" + dbName + "`");
8383
}
8484
protected boolean dropDatabase(String dbName) {
85-
return ClickHouseServerForTest.runQuery("DROP DATABASE IF EXISTS " + dbName);
85+
return ClickHouseServerForTest.runQuery("DROP DATABASE IF EXISTS `" + dbName + "`");
8686
}
8787
}

clickhouse-client/src/test/java/com/clickhouse/client/ClickHouseServerForTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ public static void afterSuite() {
353353
}
354354

355355
if (isCloud) {
356-
if (!runQuery("DROP DATABASE IF EXISTS " + database)) {
356+
if (!runQuery("DROP DATABASE IF EXISTS `" + database + "`")) {
357357
LOGGER.warn("Failed to drop database for testing.");
358358
}
359359
}
@@ -364,7 +364,7 @@ public static String getDatabase() {
364364
}
365365

366366
public static boolean runQuery(String sql) {
367-
LOGGER.info("Run a query for testing...");
367+
LOGGER.info("runQuery: (\"" + sql + "\")");
368368

369369
if (clickhouseContainer != null) {
370370
try {

0 commit comments

Comments
 (0)