1 // Copyright 2016 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
13 func TestDeadlineExceededIsNetError(t
*testing
.T
) {
14 err
, ok
:= context
.DeadlineExceeded
.(net
.Error
)
16 t
.Fatal("DeadlineExceeded does not implement net.Error")
18 if !err
.Timeout() ||
!err
.Temporary() {
19 t
.Fatalf("Timeout() = %v, Temporary() = %v, want true, true", err
.Timeout(), err
.Temporary())