Skip to content

Commit d6ad120

Browse files
committed
fix(test): only apply session to http
1 parent 8e23fe6 commit d6ad120

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/std/utils.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ func GetConnectionFromDSNWithSessionID(dsn string, sessionID string) (*sql.DB, e
137137
dsn = fmt.Sprintf("%s&insert_quorum=%s&insert_quorum_parallel=0&select_sequential_consistency=1", dsn, insertQuorum)
138138
if strings.HasPrefix(dsn, "http") {
139139
dsn = fmt.Sprintf("%s&wait_end_of_query=1", dsn)
140-
}
141140

142-
// Optionally provide session ID after initial version check to prevent locking
143-
if len(sessionID) > 0 {
144-
dsn = fmt.Sprintf("%s&session_id=%s", dsn, sessionID)
141+
// Optionally provide session ID after initial version check to prevent locking
142+
if len(sessionID) > 0 {
143+
dsn = fmt.Sprintf("%s&session_id=%s", dsn, sessionID)
144+
}
145145
}
146146

147147
return sql.Open("clickhouse", dsn)

0 commit comments

Comments
 (0)