Skip to content

Commit

Permalink
Merge pull request moby#43844 from Abirdcfly/master
Browse files Browse the repository at this point in the history
fix minor code unreachability error
  • Loading branch information
tianon authored Aug 13, 2022
2 parents 9162840 + 9031de6 commit 8d9d5a3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions libnetwork/ipam/parallel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,12 @@ func allocate(t *testing.T, tctx *testContext, parallel int64) {
}
if there, ok := tctx.ipMap[ip.String()]; ok && there {
t.Fatalf("Got duplicate IP %s", ip.String())
break
}
tctx.ipList = append(tctx.ipList, ip)
tctx.ipMap[ip.String()] = true
}

assert.Check(t, is.Len(tctx.ipList, tctx.maxIP))
if len(tctx.ipList) != tctx.maxIP {
t.Fatal("mismatch number allocation")
}
assert.Assert(t, is.Len(tctx.ipList, tctx.maxIP))
}

func release(t *testing.T, tctx *testContext, mode releaseMode, parallel int64) {
Expand Down

0 comments on commit 8d9d5a3

Please sign in to comment.