This test demonstrates that it is possible to recognize standard errors that have been sent over the network.
(t *testing.T)
| 102 | // This test demonstrates that it is possible to recognize standard |
| 103 | // errors that have been sent over the network. |
| 104 | func TestStandardErrorRemoteEquivalence(t *testing.T) { |
| 105 | tt := testutils.T{T: t} |
| 106 | |
| 107 | err1 := io.EOF |
| 108 | err2 := context.DeadlineExceeded |
| 109 | |
| 110 | newErr1 := network(err1) |
| 111 | |
| 112 | tt.Check(markers.Is(err1, newErr1)) |
| 113 | tt.Check(markers.Is(newErr1, err1)) |
| 114 | tt.Check(!markers.Is(err2, newErr1)) |
| 115 | } |
| 116 | |
| 117 | // This test demonstrates that it is possible to recognize standard |
| 118 | // errors that have been sent over the network. |