fstests: make findObject() sleep a bit longer to fix b2 largePut tests

This commit is contained in:
Nick Craig-Wood 2018-10-14 14:45:23 +01:00
parent 0f2a5403db
commit c3a8eb1c10

View file

@ -111,13 +111,15 @@ func objsToNames(objs []fs.Object) []string {
func findObject(t *testing.T, f fs.Fs, Name string) fs.Object {
var obj fs.Object
var err error
sleepTime := 1 * time.Second
for i := 1; i <= *fstest.ListRetries; i++ {
obj, err = f.NewObject(Name)
if err == nil {
break
}
t.Logf("Sleeping for 1 second for findObject eventual consistency: %d/%d (%v)", i, *fstest.ListRetries, err)
time.Sleep(1 * time.Second)
t.Logf("Sleeping for %v for findObject eventual consistency: %d/%d (%v)", sleepTime, i, *fstest.ListRetries, err)
time.Sleep(sleepTime)
sleepTime = (sleepTime * 3) / 2
}
require.NoError(t, err)
return obj