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

Function test_container_mt_stop_empty

cpp/src/container_test.cpp:465–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463};
464
465void test_container_mt_stop_empty() {
466 test_mt_handler th;
467 proton::container c(th);
468 c.auto_stop( false );
469 container_runner runner(c);
470 auto t = std::thread(runner);
471 // Must ensure that thread is joined
472 try {
473 ASSERT_EQUAL("start", th.wait());
474 c.stop();
475 t.join();
476 ASSERT_EQUAL("", th.error().name());
477 } catch (const std::exception &e) {
478 std::cerr << FAIL_MSG(e.what()) << std::endl;
479 // If join hangs, let the test die by timeout. We cannot
480 // detach and continue: deleting the container while it is
481 // still alive will put the process in an undefined state.
482 t.join();
483 throw;
484 }
485}
486
487void test_container_mt_stop() {
488 test_mt_handler th;

Callers 1

mainFunction · 0.85

Calls 7

joinMethod · 0.80
waitMethod · 0.65
auto_stopMethod · 0.45
stopMethod · 0.45
nameMethod · 0.45
errorMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected