Skip to content

Commit 789349c

Browse files
committed
update result verification
1 parent 4ac4311 commit 789349c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/connection_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,13 @@ func TestConcurrentConnections(t *testing.T) {
138138
defer wg.Done()
139139
var val int
140140
err := DB.Connection(func(tx *gorm.DB) error {
141-
return tx.Raw("SELECT 1 FROM dual").Scan(&val).Error
141+
return tx.Raw("SELECT ? FROM dual", i).Scan(&val).Error
142142
})
143143
if err != nil {
144144
errChan <- fmt.Errorf("goroutine #%d: connection err: %v", i, err)
145145
return
146146
}
147-
if val != 1 {
147+
if val != i {
148148
errChan <- fmt.Errorf("goroutine #%d: got wrong result: %v", i, val)
149149
}
150150
}(i)

0 commit comments

Comments
 (0)