Skip to content

Commit

Permalink
fix(test): dblock ttl can not less than 1 second
Browse files Browse the repository at this point in the history
  • Loading branch information
yeehomfoo committed Apr 21, 2024
1 parent 97ffe9e commit b05f17f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lock/db/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func TestLock(t *testing.T) {
assert.NoError(t, err)
err = db.AutoMigrate(&ResourceLock{})
assert.NoError(t, err)
lock := NewDBLock(db.Debug(), 500*time.Millisecond)
lock := NewDBLock(db.Debug(), 1*time.Second)
l, err := lock.Lock(context.Background(), "abc")
assert.NoError(t, err)
r := l.(*ResourceLock)
Expand Down

0 comments on commit b05f17f

Please sign in to comment.