Change default timeout interval to avoid test fail on CI

This commit is contained in:
Jinzhu 2020-09-01 14:01:59 +08:00
parent 308d22b166
commit e98a4a3a4e
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ import (
func TestPreparedStmt(t *testing.T) {
tx := DB.Session(&gorm.Session{PrepareStmt: true})
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond)
defer cancel()
txCtx := tx.WithContext(ctx)