mirror of
https://github.com/refraction-networking/uquic.git
synced 2025-04-07 06:07:36 +03:00
use the os.ErrDeadlineExceeded for stream deadline errors on Go 1.15
This commit is contained in:
parent
7c204d4d9e
commit
fefdea3420
4 changed files with 41 additions and 9 deletions
21
stream_deadline_error_test.go
Normal file
21
stream_deadline_error_test.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
// +build go1.15
|
||||
|
||||
package quic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
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))
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue