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

Method Read

test/norace_test.go:76–84  ·  view source on GitHub ↗
(p []byte)

Source from the content-addressed store, hash-verified

74type slow struct{ n int }
75
76func (sr *slow) Read(p []byte) (n int, err error) {
77 if sr.n <= 0 {
78 return 0, io.EOF
79 }
80 sr.n--
81 time.Sleep(10 * time.Millisecond)
82 p[0] = 'A'
83 return 1, nil
84}
85
86func TestNoRaceObjectDoublePut(t *testing.T) {
87 s := RunBasicJetStreamServer()

Callers 13

TestErrOnMaxPayloadLimitFunction · 0.45
startStalledMockServerFunction · 0.45
TestGetClientIDFunction · 0.45
TestTLSHandshakeFirstFunction · 0.45
TestObjectBasicsFunction · 0.45
TestDefaultObjectStatusFunction · 0.45
TestObjectFileBasicsFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected