(t *testing.T)
| 196 | } |
| 197 | |
| 198 | func TestOldContextRequestWithTimeoutCanceled(t *testing.T) { |
| 199 | s := RunDefaultServer() |
| 200 | defer s.Shutdown() |
| 201 | |
| 202 | nc, err := nats.Connect(nats.DefaultURL, nats.UseOldRequestStyle()) |
| 203 | if err != nil { |
| 204 | t.Fatalf("Failed to connect: %v", err) |
| 205 | } |
| 206 | defer nc.Close() |
| 207 | |
| 208 | testContextRequestWithTimeoutCanceled(t, nc) |
| 209 | } |
| 210 | |
| 211 | func testContextRequestWithCancel(t *testing.T, nc *nats.Conn) { |
| 212 | ctx, cancelCB := context.WithCancel(context.Background()) |
nothing calls this directly
no test coverage detected