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

Class stop_reconnect_tester

cpp/src/reconnect_test.cpp:263–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261} // namespace
262
263class stop_reconnect_tester : public proton::messaging_handler {
264 public:
265 stop_reconnect_tester() :
266 container_(*this, "reconnect_tester")
267 {
268 }
269
270 void deferred_stop() {
271 container_.stop();
272 }
273
274 void on_container_start(proton::container &c) override {
275 proton::reconnect_options reconnect_options;
276 c.connect("this-is-not-going-to work.com", proton::connection_options().reconnect(reconnect_options));
277 c.schedule(proton::duration::SECOND, proton::make_work(&stop_reconnect_tester::deferred_stop, this));
278 }
279
280 void run() {
281 container_.run();
282 }
283
284 private:
285 proton::container container_;
286};
287
288int test_stop_reconnect() {
289 stop_reconnect_tester().run();

Callers 1

test_stop_reconnectFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_stop_reconnectFunction · 0.68