From 9031de6a9becd8420af3e018e4f24e7d7e429bfd Mon Sep 17 00:00:00 2001 From: Abirdcfly Date: Thu, 21 Jul 2022 15:55:00 +0800 Subject: [PATCH] fix minor code unreachability error Signed-off-by: Abirdcfly --- libnetwork/ipam/parallel_test.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libnetwork/ipam/parallel_test.go b/libnetwork/ipam/parallel_test.go index 52e1f83365..636fc4bc60 100644 --- a/libnetwork/ipam/parallel_test.go +++ b/libnetwork/ipam/parallel_test.go @@ -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) {