Skip to content

Commit 6de88a9

Browse files
committed
fixup! fix(testsuite):fix flaky by ensure port is free to use
1 parent d887e14 commit 6de88a9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pkg/port/testsuite/testsuite.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ func testProtoRoutine(t *testing.T, proto string, d port.ParentDriver, childPID,
250250
if err := d.RemovePort(context.TODO(), id); err != nil {
251251
panic(err)
252252
}
253+
t.Logf("closed port ID %d", portStatus.ID)
253254
}(portStatus.ID)
254255

255256
t.Logf("opened port: %+v", portStatus)
@@ -301,10 +302,6 @@ func testProtoRoutine(t *testing.T, proto string, d port.ParentDriver, childPID,
301302
// nc -u does not exit automatically
302303
syscall.Kill(cmd.Process.Pid, syscall.SIGKILL)
303304
}
304-
if err := d.RemovePort(context.TODO(), portStatus.ID); err != nil {
305-
panic(err)
306-
}
307-
t.Logf("closed port ID %d", portStatus.ID)
308305
}
309306

310307
func ensureDeps(t testing.TB, deps ...string) {

0 commit comments

Comments
 (0)