Intention was to stop iterating when *all* of the keepstore servers
need 0 pulls, but the code as written stops on the N>1st iteration
when *any* of the keepstore servers need 0 pulls. This caused a false
negative when it took more than one iteration for keepstore to
complete the requested pulls.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@curii.com>
if iter == 0 {
c.Check(logBuf.String(), check.Matches, `(?ms).*ChangeSet{Pulls:1.*`)
c.Check(logBuf.String(), check.Not(check.Matches), `(?ms).*ChangeSet{.*Trashes:[^0]}*`)
- } else if strings.Contains(logBuf.String(), "ChangeSet{Pulls:0") {
+ } else if !strings.Contains(logBuf.String(), "ChangeSet{Pulls:1") {
break
}
time.Sleep(200 * time.Millisecond)