(t *testing.T)
| 125 | } |
| 126 | |
| 127 | func TestOldContextRequestWithTimeout(t *testing.T) { |
| 128 | s := RunDefaultServer() |
| 129 | defer s.Shutdown() |
| 130 | |
| 131 | nc, err := nats.Connect(nats.DefaultURL, nats.UseOldRequestStyle()) |
| 132 | if err != nil { |
| 133 | t.Fatalf("Failed to connect: %v", err) |
| 134 | } |
| 135 | defer nc.Close() |
| 136 | |
| 137 | testContextRequestWithTimeout(t, nc) |
| 138 | } |
| 139 | |
| 140 | func testContextRequestWithTimeoutCanceled(t *testing.T, nc *nats.Conn) { |
| 141 | ctx, cancelCB := context.WithTimeout(context.Background(), 100*time.Millisecond) |
nothing calls this directly
no test coverage detected