1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #21603 from aaronlehmann/testtransfer-flakiness-2

Fix flaky test TestTransfer (take 2)
This commit is contained in:
Alexander Morozov 2016-03-29 21:40:38 -07:00
commit d02e24f27d

View file

@ -37,11 +37,7 @@ func TestTransfer(t *testing.T) {
go func() {
for p := range progressChan {
val, present := receivedProgress[p.ID]
if !present {
if p.Current != 0 {
t.Fatalf("got unexpected progress value: %d (expected 0)", p.Current)
}
} else if p.Current <= val {
if present && p.Current <= val {
t.Fatalf("got unexpected progress value: %d (expected %d)", p.Current, val+1)
}
receivedProgress[p.ID] = p.Current