From 97ed0d0bf9482ad430b9712ad3e9133c7ee28657 Mon Sep 17 00:00:00 2001 From: Slach Date: Wed, 6 Dec 2023 10:03:20 +0400 Subject: [PATCH] improve TestSkipNotExistsTable, integration_test.go after CI/CD failure, CODE 60 CATCHED, but looks like DROP DATABASE return error --- test/integration/integration_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go index 1e67be00..b387a635 100644 --- a/test/integration/integration_test.go +++ b/test/integration/integration_test.go @@ -1080,7 +1080,7 @@ func TestSkipNotExistsTable(t *testing.T) { }() wg.Wait() r.True(freezeErrorHandled, "freezeErrorHandled false") - dropDbSQL := "DROP DATABASE freeze_not_exists" + dropDbSQL := "DROP DATABASE IF EXISTS freeze_not_exists" if isAtomic, err := ch.chbackend.IsAtomic("freeze_not_exists"); err == nil && isAtomic { dropDbSQL += " SYNC" } @@ -2528,6 +2528,9 @@ func (ch *TestClickHouse) checkDatabaseEngine(t *testing.T, data TestDataStruct) func (ch *TestClickHouse) queryWithNoError(r *require.Assertions, query string, args ...interface{}) { err := ch.chbackend.Query(query, args...) + if err != nil { + ch.chbackend.Log.Errorf("queryWithNoError error: %v", err) + } r.NoError(err) }