Skip to content

Commit

Permalink
stop using net.Error.Temporary in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Apr 2, 2022
1 parent cb847cc commit 2b93307
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion fuzzing/handshake/fuzz.go
Expand Up @@ -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()
}
Expand Down
3 changes: 0 additions & 3 deletions internal/qerr/errors_test.go
Expand Up @@ -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"))
})

Expand All @@ -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"))
})
})
Expand Down Expand Up @@ -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())
})
})

Expand Down
1 change: 0 additions & 1 deletion receive_stream_test.go
Expand Up @@ -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"))
})
Expand Down
1 change: 0 additions & 1 deletion stream_test.go
Expand Up @@ -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))
Expand Down
1 change: 0 additions & 1 deletion streams_map_test.go
Expand Up @@ -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())
}

Expand Down

0 comments on commit 2b93307

Please sign in to comment.