Skip to content

Commit 35b4c2a

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

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ public static void beforeSuite() {
331331
clickhouseContainer.start();
332332

333333
if (clickhouseContainer.isRunning()) {
334-
if (!runQuery("CREATE DATABASE IF NOT EXISTS " + getDatabase())) {
334+
if (!runQuery("CREATE DATABASE IF NOT EXISTS `" + getDatabase() + "\`")) {
335335
throw new RuntimeException("Failed to create database");
336336
}
337337
}
@@ -366,6 +366,12 @@ public static String getDatabase() {
366366
public static boolean runQuery(String sql) {
367367
LOGGER.info("runQuery: (\"" + sql + "\")");
368368

369+
try {
370+
throw new Exception("test");
371+
} catch (Exception e) {
372+
e.printStackTrace();
373+
}
374+
369375
if (clickhouseContainer != null) {
370376
try {
371377
Container.ExecResult res = clickhouseContainer.execInContainer("clickhouse-client",

0 commit comments

Comments
 (0)