mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:36:38 +08:00
Increase retries for eventual consistency in tests
This commit is contained in:
parent
29ecc2d8bb
commit
c270c1c80c
|
@ -121,7 +121,8 @@ func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision ti
|
|||
is := NewItems(items)
|
||||
oldErrors := fs.Stats.GetErrors()
|
||||
var objs []fs.Object
|
||||
for i := 1; i <= 5; i++ {
|
||||
const retries = 10
|
||||
for i := 1; i <= retries; i++ {
|
||||
objs = nil
|
||||
for obj := range f.List() {
|
||||
objs = append(objs, obj)
|
||||
|
@ -129,7 +130,7 @@ func CheckListingWithPrecision(t *testing.T, f fs.Fs, items []Item, precision ti
|
|||
if len(objs) == len(items) {
|
||||
break
|
||||
}
|
||||
t.Logf("Sleeping for 1 second for list eventual consistency: %d/5", i)
|
||||
t.Logf("Sleeping for 1 second for list eventual consistency: %d/%d", i, retries)
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
for _, obj := range objs {
|
||||
|
|
Loading…
Reference in New Issue
Block a user