stop using net.Error.Temporary in tests

This commit is contained in:
Marten Seemann 2022-04-02 20:23:00 +01:00
parent 0c6b3dfa93
commit 4f85f45f0a
5 changed files with 0 additions and 7 deletions

View file

@ -300,7 +300,6 @@ func runHandshake(runConfig [confLen]byte, messageConfig uint8, clientConf *tls.
serverConf.ClientAuth = getClientAuth(runConfig[1] & 0b00000111)
serverConf.CipherSuites = getSuites(runConfig[1] >> 6)
serverConf.SessionTicketsDisabled = helper.NthBit(runConfig[1], 3)
clientConf.PreferServerCipherSuites = helper.NthBit(runConfig[1], 4)
if helper.NthBit(runConfig[2], 0) {
clientConf.RootCAs = x509.NewCertPool()
}

View file

@ -73,7 +73,6 @@ var _ = Describe("QUIC Errors", func() {
nerr, ok := err.(net.Error)
Expect(ok).To(BeTrue())
Expect(nerr.Timeout()).To(BeTrue())
Expect(nerr.Temporary()).To(BeFalse())
Expect(err.Error()).To(Equal("timeout: handshake did not complete in time"))
})
@ -84,7 +83,6 @@ var _ = Describe("QUIC Errors", func() {
nerr, ok := err.(net.Error)
Expect(ok).To(BeTrue())
Expect(nerr.Timeout()).To(BeTrue())
Expect(nerr.Temporary()).To(BeFalse())
Expect(err.Error()).To(Equal("timeout: no recent network activity"))
})
})
@ -112,7 +110,6 @@ var _ = Describe("QUIC Errors", func() {
nerr, ok := err.(net.Error)
Expect(ok).To(BeTrue())
Expect(nerr.Timeout()).To(BeFalse())
Expect(nerr.Temporary()).To(BeTrue())
})
})

View file

@ -218,7 +218,6 @@ var _ = Describe("Receive Stream", func() {
Context("deadlines", func() {
It("the deadline error has the right net.Error properties", func() {
Expect(errDeadline.Temporary()).To(BeTrue())
Expect(errDeadline.Timeout()).To(BeTrue())
Expect(errDeadline).To(MatchError("deadline exceeded"))
})

View file

@ -99,7 +99,6 @@ var _ = Describe("Stream", func() {
var _ = Describe("Deadline Error", func() {
It("is a net.Error that wraps os.ErrDeadlineError", func() {
err := deadlineError{}
Expect(err.Temporary()).To(BeTrue())
Expect(err.Timeout()).To(BeTrue())
Expect(errors.Is(err, os.ErrDeadlineExceeded)).To(BeTrue())
Expect(errors.Unwrap(err)).To(Equal(os.ErrDeadlineExceeded))

View file

@ -38,7 +38,6 @@ func expectTooManyStreamsError(err error) {
ExpectWithOffset(1, err.Error()).To(Equal(errTooManyOpenStreams.Error()))
nerr, ok := err.(net.Error)
ExpectWithOffset(1, ok).To(BeTrue())
ExpectWithOffset(1, nerr.Temporary()).To(BeTrue())
ExpectWithOffset(1, nerr.Timeout()).To(BeFalse())
}