Signed-off-by: Abirdcfly <fp544037857@gmail.com>
| ... | ... |
@@ -224,16 +224,12 @@ func allocate(t *testing.T, tctx *testContext, parallel int64) {
|
| 224 | 224 |
} |
| 225 | 225 |
if there, ok := tctx.ipMap[ip.String()]; ok && there {
|
| 226 | 226 |
t.Fatalf("Got duplicate IP %s", ip.String())
|
| 227 |
- break |
|
| 228 | 227 |
} |
| 229 | 228 |
tctx.ipList = append(tctx.ipList, ip) |
| 230 | 229 |
tctx.ipMap[ip.String()] = true |
| 231 | 230 |
} |
| 232 | 231 |
|
| 233 |
- assert.Check(t, is.Len(tctx.ipList, tctx.maxIP)) |
|
| 234 |
- if len(tctx.ipList) != tctx.maxIP {
|
|
| 235 |
- t.Fatal("mismatch number allocation")
|
|
| 236 |
- } |
|
| 232 |
+ assert.Assert(t, is.Len(tctx.ipList, tctx.maxIP)) |
|
| 237 | 233 |
} |
| 238 | 234 |
|
| 239 | 235 |
func release(t *testing.T, tctx *testContext, mode releaseMode, parallel int64) {
|