MCPcopy
hub / github.com/nats-io/nats.go / checkErrChannel

Function checkErrChannel

nats_test.go:85–94  ·  view source on GitHub ↗

Check the error channel for an error and if one is present, calls t.Fatal(e.Error()). Note that this supports tests that send nil to the error channel and so report error only if e is != nil.

(t *testing.T, errCh chan error)

Source from the content-addressed store, hash-verified

83// send nil to the error channel and so report error only if
84// e is != nil.
85func checkErrChannel(t *testing.T, errCh chan error) {
86 t.Helper()
87 select {
88 case e := <-errCh:
89 if e != nil {
90 t.Fatal(e.Error())
91 }
92 default:
93 }
94}
95
96func TestVersionMatchesTag(t *testing.T) {
97 refType := os.Getenv("GITHUB_REF_TYPE")

Callers 1

TestNKeyOptionFromSeedFunction · 0.70

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected