s3store: relax test to prevent failure from race conditions (#529)
* fix: if a race condition occur, we check for it in the test * fix: windows sometimes only has 1 file * Trigger test runs * Trigger test runs * Trigger test runs * Trigger test runs * Trigger test runs
This commit is contained in:
parent
d1e710d065
commit
511ebaed0e
|
@ -1275,7 +1275,8 @@ func (s s3APIWithTempFileAssertion) UploadPartWithContext(context.Context, *s3.U
|
||||||
for _, file := range files {
|
for _, file := range files {
|
||||||
assert.True(strings.HasPrefix(file.Name(), "tusd-s3-tmp-"))
|
assert.True(strings.HasPrefix(file.Name(), "tusd-s3-tmp-"))
|
||||||
}
|
}
|
||||||
assert.Equal(len(files), 2)
|
assert.GreaterOrEqual(len(files), 1)
|
||||||
|
assert.LessOrEqual(len(files), 3)
|
||||||
|
|
||||||
return nil, fmt.Errorf("not now")
|
return nil, fmt.Errorf("not now")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue