Send then receive
(t *testing.T)
| 159 | |
| 160 | // Send then receive |
| 161 | func TestExampleSendReceive(t *testing.T) { |
| 162 | if testing.Short() { |
| 163 | t.Skip("Skip demo tests in short mode") |
| 164 | } |
| 165 | testBroker.start(t) |
| 166 | err := runExampleWant(t, |
| 167 | fmt.Sprintf("Received all %d acknowledgements\n", expected), |
| 168 | "send", |
| 169 | exampleArgs("-count", fmt.Sprintf("%d", *count))...) |
| 170 | if err != nil { |
| 171 | t.Fatal(err) |
| 172 | } |
| 173 | err = runExampleWant(t, |
| 174 | fmt.Sprintf("Listening on %v connections\nReceived %v messages\n", *connections, *count**connections), |
| 175 | "receive", |
| 176 | exampleArgs("-count", fmt.Sprintf("%d", *count**connections))...) |
| 177 | if err != nil { |
| 178 | t.Fatal(err) |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | var ready error |
| 183 |
nothing calls this directly
no test coverage detected