Fix integration tests for drive
This commit is contained in:
parent
b9c8e61d39
commit
ac3c83f966
2 changed files with 4 additions and 2 deletions
|
@ -199,7 +199,7 @@ func (r *Run) WriteObjectTo(f fs.Fs, remote, content string, modTime time.Time,
|
||||||
r.Fatalf("Fs doesn't support PutUnchecked")
|
r.Fatalf("Fs doesn't support PutUnchecked")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const maxTries = 5
|
const maxTries = 10
|
||||||
if !r.mkdir[f.String()] {
|
if !r.mkdir[f.String()] {
|
||||||
err := f.Mkdir()
|
err := f.Mkdir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -217,6 +217,7 @@ func (r *Run) WriteObjectTo(f fs.Fs, remote, content string, modTime time.Time,
|
||||||
// Retry if err returned a retry error
|
// Retry if err returned a retry error
|
||||||
if fs.IsRetryError(err) && tries < maxTries {
|
if fs.IsRetryError(err) && tries < maxTries {
|
||||||
r.Logf("Retry Put of %q to %v: %d/%d (%v)", remote, f, tries, maxTries, err)
|
r.Logf("Retry Put of %q to %v: %d/%d (%v)", remote, f, tries, maxTries, err)
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
r.Fatalf("Failed to put %q to %q: %v", remote, f, err)
|
r.Fatalf("Failed to put %q to %q: %v", remote, f, err)
|
||||||
|
@ -542,7 +543,7 @@ func TestDeduplicateFirst(t *testing.T) {
|
||||||
|
|
||||||
objects, size, err := fs.Count(r.fremote)
|
objects, size, err := fs.Count(r.fremote)
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
assert.Equal(t, 1, objects)
|
assert.Equal(t, int64(1), objects)
|
||||||
if size != file1.Size && size != file2.Size && size != file3.Size {
|
if size != file1.Size && size != file2.Size && size != file3.Size {
|
||||||
t.Errorf("Size not one of the object sizes %d", size)
|
t.Errorf("Size not one of the object sizes %d", size)
|
||||||
}
|
}
|
||||||
|
|
|
@ -201,6 +201,7 @@ again:
|
||||||
// Retry if err returned a retry error
|
// Retry if err returned a retry error
|
||||||
if fs.IsRetryError(err) && tries < maxTries {
|
if fs.IsRetryError(err) && tries < maxTries {
|
||||||
t.Logf("Put error: %v - low level retry %d/%d", err, tries, maxTries)
|
t.Logf("Put error: %v - low level retry %d/%d", err, tries, maxTries)
|
||||||
|
time.Sleep(2 * time.Second)
|
||||||
|
|
||||||
tries++
|
tries++
|
||||||
goto again
|
goto again
|
||||||
|
|
Loading…
Reference in a new issue