Skip to content

Commit

Permalink
Add comment on locker_test.go regarding testing the session KeepAlive
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-anders committed Sep 20, 2018
1 parent ca26a45 commit 6ba04a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions etcd3locker/locker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func TestEtcd3Locker(t *testing.T) {
a.NoError(locker.LockUpload("one"))
a.Equal(tusd.ErrFileLocked, locker.LockUpload("one"))
time.Sleep(5 * time.Second)
// test that we can't take over the upload via a different etcd3 session
// while an upload is already taking place; testing etcd3 session KeepAlive
a.Equal(tusd.ErrFileLocked, locker.LockUpload("one"))
a.NoError(locker.UnlockUpload("one"))
a.Equal(ErrLockNotHeld, locker.UnlockUpload("one"))
Expand Down

0 comments on commit 6ba04a0

Please sign in to comment.