Skip to content

Commit f6b7569

Browse files
committed
removed unused import
1 parent 5e63468 commit f6b7569

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ public static boolean isCloud() {
316316
public static void beforeSuite() {
317317
if (isCloud) {
318318
if (!runQuery("CREATE DATABASE IF NOT EXISTS " + database)) {
319-
throw new IllegalStateException("Failed to create database for testing.");
319+
throw new RuntimeException("Failed to create database for testing.");
320320
}
321321

322322
return;
@@ -370,6 +370,9 @@ public static boolean runQuery(String sql) {
370370
try {
371371
Container.ExecResult res = clickhouseContainer.execInContainer("clickhouse-client",
372372
"-u", "default", "--password", getPassword(), sql);
373+
if (res.getExitCode() != 0) {
374+
LOGGER.error("query execution result: stderr={}, stdout={}", res.getStderr(), res.getStdout() );
375+
}
373376
return res.getExitCode() == 0;
374377
} catch (Exception e) {
375378
throw new RuntimeException("runQuery('" + sql + "') failed", e);

0 commit comments

Comments
 (0)