mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix flaky test TestTransfer (take 2)
TestTransfer failed in CI: https://jenkins.dockerproject.org/job/Docker-PRs-experimental/17103/console This is the same issue as https://github.com/docker/docker/pull/21233, but only one of the code paths was fixed in that PR. The one which handles the first progress update was not - it still assumed that the progress indication should be 0/10. Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
This commit is contained in:
parent
1e1da2a29b
commit
0dea21f446
1 changed files with 1 additions and 5 deletions
|
@ -37,11 +37,7 @@ func TestTransfer(t *testing.T) {
|
||||||
go func() {
|
go func() {
|
||||||
for p := range progressChan {
|
for p := range progressChan {
|
||||||
val, present := receivedProgress[p.ID]
|
val, present := receivedProgress[p.ID]
|
||||||
if !present {
|
if present && p.Current <= val {
|
||||||
if p.Current != 0 {
|
|
||||||
t.Fatalf("got unexpected progress value: %d (expected 0)", p.Current)
|
|
||||||
}
|
|
||||||
} else if p.Current <= val {
|
|
||||||
t.Fatalf("got unexpected progress value: %d (expected %d)", p.Current, val+1)
|
t.Fatalf("got unexpected progress value: %d (expected %d)", p.Current, val+1)
|
||||||
}
|
}
|
||||||
receivedProgress[p.ID] = p.Current
|
receivedProgress[p.ID] = p.Current
|
||||||
|
|
Loading…
Reference in a new issue