From f6be8716b55192f1f2d5fc5072496280789f6ecc Mon Sep 17 00:00:00 2001 From: Lucas Clemente Date: Fri, 3 Jun 2016 15:12:53 +0200 Subject: [PATCH] kill client after timeout in integration tests this should fix the hang-issue of #163 --- h2quic/integration_test.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/h2quic/integration_test.go b/h2quic/integration_test.go index 8c13d59f..88254836 100644 --- a/h2quic/integration_test.go +++ b/h2quic/integration_test.go @@ -96,6 +96,7 @@ var _ = Describe("Integration tests", func() { ) session, err := Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) + defer session.Kill() Eventually(session).Should(Exit(0)) Expect(session.Out).To(Say("Response:\nheaders: HTTP/1.1 200\nstatus: 200\n\nbody: Hello, World!\n")) }) @@ -111,6 +112,7 @@ var _ = Describe("Integration tests", func() { ) session, err := Start(command, GinkgoWriter, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) + defer session.Kill() Eventually(session).Should(Exit(0)) Expect(session.Out).To(Say("Response:\nheaders: HTTP/1.1 200\nstatus: 200\n\nbody: foo\n")) }) @@ -125,6 +127,7 @@ var _ = Describe("Integration tests", func() { ) session, err := Start(command, nil, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) + defer session.Kill() Eventually(session, 2).Should(Exit(0)) Expect(bytes.Contains(session.Out.Contents(), data)).To(BeTrue()) }) @@ -145,6 +148,7 @@ var _ = Describe("Integration tests", func() { ) session, err := Start(command, nil, GinkgoWriter) Expect(err).NotTo(HaveOccurred()) + defer session.Kill() Eventually(session, 3).Should(Exit(0)) Expect(bytes.Contains(session.Out.Contents(), data)).To(BeTrue()) }()