Skip to content

Commit 6f5929d

Browse files
committed
clickhouse-test set test status to broken upon UNKNOWN_DATABASE error
1 parent f9a9a99 commit 6f5929d

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/clickhouse-test

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,7 @@ class TestStatus(enum.Enum):
891891
OK = "OK"
892892
SKIPPED = "SKIPPED"
893893
NOT_FAILED = "NOT_FAILED"
894+
BROKEN = "BROKEN"
894895

895896

896897
class FailureReason(enum.Enum):
@@ -2105,6 +2106,13 @@ class TestCase:
21052106
if result.status == TestStatus.FAIL:
21062107
result.description = self.add_info_about_settings(result.description)
21072108

2109+
if "UNKNOWN_DATABASE" in result.description:
2110+
result.status = TestStatus.BROKEN
2111+
result.need_retry = False
2112+
result.description += (
2113+
"\nUNKNOWN_DATABASE issue detected, set test status to BROKEN"
2114+
)
2115+
21082116
if self.name in suite.blacklist_check:
21092117
if result.status == TestStatus.OK:
21102118
result.status = TestStatus.NOT_FAILED
@@ -2594,13 +2602,19 @@ def run_tests_array(
25942602
+ colored(" NOT_FAILED ", args, "red", attrs=["bold"])
25952603
+ CL_SQUARE_BRACKET
25962604
)
2605+
MSG_BROKEN = (
2606+
OP_SQUARE_BRACKET
2607+
+ colored(" BROKEN ", args, "orange", attrs=["bold"])
2608+
+ CL_SQUARE_BRACKET
2609+
)
25972610

25982611
MESSAGES = {
25992612
TestStatus.FAIL: MSG_FAIL,
26002613
TestStatus.UNKNOWN: MSG_UNKNOWN,
26012614
TestStatus.OK: MSG_OK,
26022615
TestStatus.SKIPPED: MSG_SKIPPED,
26032616
TestStatus.NOT_FAILED: MSG_NOT_FAILED,
2617+
TestStatus.BROKEN: MSG_BROKEN,
26042618
}
26052619

26062620
passed_total = 0

0 commit comments

Comments
 (0)