Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 7985dcb

Browse files
committed
1 parent 07664d4 commit 7985dcb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clickhouse_negative_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ func Test_Negative_OpenConnectAndPing(t *testing.T) {
1818
if connect, err := sql.Open("clickhouse", "tcp://127.0.0.1:9000?username=invalid"); assert.NoError(t, err) {
1919
if err := connect.Ping(); assert.Error(t, err) {
2020
if exception, ok := err.(*clickhouse.Exception); assert.True(t, ok) {
21-
assert.Equal(t, int32(192), exception.Code)
21+
assert.Truef(t, exception.Code == int32(192) || exception.Code == int32(516), "Not equal. Expected: 192 or 516. Actual: %n", exception.Code)
2222
}
2323
}
2424
}
2525
if connect, err := sql.Open("clickhouse", "tcp://127.0.0.1:9000?password=invalid"); assert.NoError(t, err) {
2626
if err := connect.Ping(); assert.Error(t, err) {
2727
if exception, ok := err.(*clickhouse.Exception); assert.True(t, ok) {
28-
assert.Equal(t, int32(193), exception.Code)
28+
assert.Truef(t, exception.Code == int32(192) || exception.Code == int32(516), "Not equal. Expected: 192 or 516. Actual: %n", exception.Code)
2929
}
3030
}
3131
}

0 commit comments

Comments
 (0)