浏览代码

fix minor code unreachability error

Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Abirdcfly 2 年之前
父节点
当前提交
9031de6a9b
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      libnetwork/ipam/parallel_test.go

+ 1 - 5
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) {