mirror of
https://github.com/restic/restic.git
synced 2025-03-09 00:00:02 +01:00
Set "fake" PID on Windows to larger value.
Since Windows cannot do SIGHUP signals, we need to make sure the process ID doesn't exist for the tests to succeed.
This commit is contained in:
parent
a260e82e6a
commit
cc805b9325
1 changed files with 2 additions and 2 deletions
|
@ -124,7 +124,7 @@ var staleLockTests = []struct {
|
|||
{
|
||||
timestamp: time.Now(),
|
||||
stale: true,
|
||||
pid: os.Getpid() + 500,
|
||||
pid: os.Getpid() + 500000,
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ func TestLockWithStaleLock(t *testing.T) {
|
|||
id2, err := createFakeLock(repo, time.Now().Add(-time.Minute), os.Getpid())
|
||||
OK(t, err)
|
||||
|
||||
id3, err := createFakeLock(repo, time.Now().Add(-time.Minute), os.Getpid()+500)
|
||||
id3, err := createFakeLock(repo, time.Now().Add(-time.Minute), os.Getpid()+500000)
|
||||
OK(t, err)
|
||||
|
||||
OK(t, restic.RemoveStaleLocks(repo))
|
||||
|
|
Loading…
Add table
Reference in a new issue