diff --git a/integrationtests/handshake/rtt.go b/integrationtests/handshake/rtt.go index 5d8b88816..fe125eb11 100644 --- a/integrationtests/handshake/rtt.go +++ b/integrationtests/handshake/rtt.go @@ -58,7 +58,7 @@ var _ = Describe("Handshake integration tets", func() { } expectDurationInRTTs := func(num int) { - testDuration := time.Now().Sub(testStartedAt) + testDuration := time.Since(testStartedAt) expectedDuration := time.Duration(num) * rtt Expect(testDuration).To(SatisfyAll( BeNumerically(">=", expectedDuration), diff --git a/session_test.go b/session_test.go index 01aa02ccd..7265504b0 100644 --- a/session_test.go +++ b/session_test.go @@ -906,7 +906,7 @@ var _ = Describe("Session", func() { err := sess.sendPublicReset(1) Expect(err).NotTo(HaveOccurred()) Expect(mconn.written).To(HaveLen(1)) - Expect(mconn.written[0]).To(ContainSubstring(string([]byte("PRST")))) + Expect(mconn.written[0]).To(ContainSubstring("PRST")) }) It("informs the SentPacketHandler about sent packets", func() { @@ -1317,7 +1317,7 @@ var _ = Describe("Session", func() { time.Sleep(10 * time.Millisecond) // wait for the run loop to spin up sess.scheduleSending() // wake up the run loop Eventually(func() [][]byte { return mconn.written }).Should(HaveLen(1)) - Expect(mconn.written[0]).To(ContainSubstring(string([]byte("PRST")))) + Expect(mconn.written[0]).To(ContainSubstring("PRST")) Eventually(sess.runClosed).Should(BeClosed()) })