0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-11 12:31:24 +01:00

Make test more robust (#3167)

This commit is contained in:
Ethan Koenig 2017-12-11 23:17:08 -08:00 committed by Bo-Yi Wu
parent 2ad633344e
commit 9f033bf2b5

View file

@ -123,7 +123,7 @@ func TestAPILFSLocksLogged(t *testing.T) {
assert.Len(t, lfsLocks.Locks, test.totalCount) assert.Len(t, lfsLocks.Locks, test.totalCount)
for i, lock := range lfsLocks.Locks { for i, lock := range lfsLocks.Locks {
assert.EqualValues(t, test.locksOwners[i].DisplayName(), lock.Owner.Name) assert.EqualValues(t, test.locksOwners[i].DisplayName(), lock.Owner.Name)
assert.WithinDuration(t, test.locksTimes[i], lock.LockedAt, 1*time.Second) assert.WithinDuration(t, test.locksTimes[i], lock.LockedAt, 3*time.Second)
} }
req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/verify", test.repo.FullName()), map[string]string{}) req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/verify", test.repo.FullName()), map[string]string{})