MCPcopy Create free account
hub / github.com/cockroachdb/errors / TestStandardErrorRemoteEquivalence

Function TestStandardErrorRemoteEquivalence

markers/markers_test.go:104–115  ·  view source on GitHub ↗

This test demonstrates that it is possible to recognize standard errors that have been sent over the network.

(t *testing.T)

Source from the content-addressed store, hash-verified

102// This test demonstrates that it is possible to recognize standard
103// errors that have been sent over the network.
104func 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.

Callers

nothing calls this directly

Calls 3

CheckMethod · 0.95
IsFunction · 0.92
networkFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…