From 34322f2214cb18cba69bb19807a73f5355e9acba Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 26 Apr 2021 19:13:32 +0700 Subject: [PATCH] export the IdleTimeoutError and the HandshakeTimeoutError --- errors.go | 2 ++ integrationtests/self/timeout_test.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/errors.go b/errors.go index b2d2b73b..0c9f0004 100644 --- a/errors.go +++ b/errors.go @@ -11,6 +11,8 @@ type ( ApplicationError = qerr.ApplicationError VersionNegotiationError = qerr.VersionNegotiationError StatelessResetError = qerr.StatelessResetError + IdleTimeoutError = qerr.IdleTimeoutError + HandshakeTimeoutError = qerr.HandshakeTimeoutError ) type ( diff --git a/integrationtests/self/timeout_test.go b/integrationtests/self/timeout_test.go index de619b8a..e763fc33 100644 --- a/integrationtests/self/timeout_test.go +++ b/integrationtests/self/timeout_test.go @@ -54,7 +54,7 @@ func areHandshakesRunning() bool { var _ = Describe("Timeout tests", func() { checkTimeoutError := func(err error) { - ExpectWithOffset(1, err).To(HaveOccurred()) + ExpectWithOffset(1, err).To(MatchError(&quic.IdleTimeoutError{})) nerr, ok := err.(net.Error) ExpectWithOffset(1, ok).To(BeTrue()) ExpectWithOffset(1, nerr.Timeout()).To(BeTrue())