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

Function test_container_bad_address

cpp/src/container_test.cpp:204–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204int test_container_bad_address() {
205 // Listen on a bad address, check for leaks
206 // Regression test for https://issues.apache.org/jira/browse/PROTON-1217
207
208 proton::container c;
209 // Default fixed-option listener. Valgrind for leaks.
210 c.listen("999.666.999.666:0");
211 c.run();
212 // Dummy listener.
213 test_listen_handler l;
214 test_handler h2("999.999.999.666", proton::connection_options());
215 c.listen("999.666.999.666:0", l);
216 c.run();
217 ASSERT(!l.on_open_);
218 ASSERT(!l.on_accept_);
219 ASSERT(l.on_close_);
220 ASSERT(!l.on_error_.empty()); // proton:io: Name or service not known
221 return 0;
222}
223
224class stop_tester : public proton::messaging_handler {
225 proton::listener listener;

Callers 1

mainFunction · 0.85

Calls 4

connection_optionsClass · 0.70
listenMethod · 0.45
runMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected