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

Function TestOldContextRequestWithCancel

test/context_test.go:331–342  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

329}
330
331func TestOldContextRequestWithCancel(t *testing.T) {
332 s := RunDefaultServer()
333 defer s.Shutdown()
334
335 nc, err := nats.Connect(nats.DefaultURL, nats.UseOldRequestStyle())
336 if err != nil {
337 t.Fatalf("Failed to connect: %v", err)
338 }
339 defer nc.Close()
340
341 testContextRequestWithCancel(t, nc)
342}
343
344func testContextRequestWithDeadline(t *testing.T, nc *nats.Conn) {
345 deadline := time.Now().Add(100 * time.Millisecond)

Callers

nothing calls this directly

Calls 5

ConnectMethod · 0.80
FatalfMethod · 0.80
RunDefaultServerFunction · 0.70
CloseMethod · 0.45

Tested by

no test coverage detected