Skip to content

Commit 7a72ba7

Browse files
author
Paultagoras
committed
Update ClickHouseServerForTest.java
1 parent 2e24b47 commit 7a72ba7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,9 @@ public static void beforeSuite() {
339339

340340
try {
341341
clickhouseContainer.start();
342-
if (!runQuery("CREATE DATABASE IF NOT EXISTS " + database)) {
343-
throw new IllegalStateException("Failed to create database for testing.");
342+
343+
if (clickhouseContainer.isRunning()) {
344+
runQuery("CREATE DATABASE IF NOT EXISTS " + database);
344345
}
345346
} catch (RuntimeException e) {
346347
throw new IllegalStateException(new StringBuilder()

0 commit comments

Comments
 (0)