From 4f9396910187f857393e3305f3a644579ccf9ae7 Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Tue, 6 Jun 2017 09:33:46 +0200 Subject: [PATCH] Run gosimple on our tree --- integrationtests/handshake/rtt.go | 2 +- session_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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()) })