brontide: replace defer cleanup with t.Cleanup

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
Eng Zer Jun committed 2022-10-13 17:01:35 +08:00
1 parent 1dcc7d74e6
commit b796b747ed
2 files changed
+14 -15

No files matched your search

+1 -2
View File
@@ -14,9 +14,8 @@ func BenchmarkReadHeaderAndBody(t *testing.B) {
// Create a test connection, grabbing either side of the connection
// into local variables. If the initial crypto handshake fails, then
// we'll get a non-nil error here.
localConn, remoteConn, cleanUp, err := establishTestConnection()
localConn, remoteConn, err := establishTestConnection(t)
require.NoError(t, err, "unable to establish test connection: %v", err)
defer cleanUp()
rand.Seed(time.Now().Unix())