(t *testing.T)
| 300 | } |
| 301 | |
| 302 | func TestEncBuiltinExtendedSubscribeCB2(t *testing.T) { |
| 303 | s := RunServerOnPort(TEST_PORT) |
| 304 | defer s.Shutdown() |
| 305 | |
| 306 | ec := NewDefaultEConn(t) |
| 307 | defer ec.Close() |
| 308 | |
| 309 | ch := make(chan bool) |
| 310 | |
| 311 | testString := "Hello World!" |
| 312 | oSubj := "cb_args" |
| 313 | oReply := "foobar" |
| 314 | |
| 315 | ec.Subscribe(oSubj, func(subj, reply, s string) { |
| 316 | if s != testString { |
| 317 | t.Fatalf("Received test string of '%s', wanted '%s'\n", s, testString) |
| 318 | } |
| 319 | if subj != oSubj { |
| 320 | t.Fatalf("Received subject of '%s', wanted '%s'\n", subj, oSubj) |
| 321 | } |
| 322 | if reply != oReply { |
| 323 | t.Fatalf("Received reply of '%s', wanted '%s'\n", reply, oReply) |
| 324 | } |
| 325 | ch <- true |
| 326 | }) |
| 327 | ec.PublishRequest(oSubj, oReply, testString) |
| 328 | if e := Wait(ch); e != nil { |
| 329 | if ec.LastError() != nil { |
| 330 | e = ec.LastError() |
| 331 | } |
| 332 | t.Fatalf("Did not receive the message: %s", e) |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | func TestEncBuiltinRawMsgSubscribeCB(t *testing.T) { |
| 337 | s := RunServerOnPort(TEST_PORT) |
nothing calls this directly
no test coverage detected