Skip to content

Commit

Permalink
fix(test): only apply session to http
Browse files Browse the repository at this point in the history
  • Loading branch information
SpencerTorres committed Feb 27, 2025
1 parent 8e23fe6 commit d6ad120
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/std/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ func GetConnectionFromDSNWithSessionID(dsn string, sessionID string) (*sql.DB, e
dsn = fmt.Sprintf("%s&insert_quorum=%s&insert_quorum_parallel=0&select_sequential_consistency=1", dsn, insertQuorum)
if strings.HasPrefix(dsn, "http") {
dsn = fmt.Sprintf("%s&wait_end_of_query=1", dsn)
}

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

return sql.Open("clickhouse", dsn)
Expand Down

0 comments on commit d6ad120

Please sign in to comment.