MCPcopy Create free account
hub / github.com/apache/qpid-proton / TestExampleSendReceive

Function TestExampleSendReceive

go/examples/example_test.go:161–180  ·  view source on GitHub ↗

Send then receive

(t *testing.T)

Source from the content-addressed store, hash-verified

159
160// Send then receive
161func 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
182var ready error
183

Callers

nothing calls this directly

Calls 3

runExampleWantFunction · 0.85
exampleArgsFunction · 0.85
startMethod · 0.45

Tested by

no test coverage detected