fix minor code unreachability error
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
This commit is contained in:
parent
7624f8aeb1
commit
9031de6a9b
|
@ -224,16 +224,12 @@ func allocate(t *testing.T, tctx *testContext, parallel int64) {
|
||||||
}
|
}
|
||||||
if there, ok := tctx.ipMap[ip.String()]; ok && there {
|
if there, ok := tctx.ipMap[ip.String()]; ok && there {
|
||||||
t.Fatalf("Got duplicate IP %s", ip.String())
|
t.Fatalf("Got duplicate IP %s", ip.String())
|
||||||
break
|
|
||||||
}
|
}
|
||||||
tctx.ipList = append(tctx.ipList, ip)
|
tctx.ipList = append(tctx.ipList, ip)
|
||||||
tctx.ipMap[ip.String()] = true
|
tctx.ipMap[ip.String()] = true
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Check(t, is.Len(tctx.ipList, tctx.maxIP))
|
assert.Assert(t, is.Len(tctx.ipList, tctx.maxIP))
|
||||||
if len(tctx.ipList) != tctx.maxIP {
|
|
||||||
t.Fatal("mismatch number allocation")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func release(t *testing.T, tctx *testContext, mode releaseMode, parallel int64) {
|
func release(t *testing.T, tctx *testContext, mode releaseMode, parallel int64) {
|
||||||
|
|
Loading…
Reference in New Issue