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

Function test_message_timeout_fail

cpp/src/connection_driver_test.cpp:510–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void test_message_timeout_fail() {
511 // Verify a message arrives intact
512 record_handler ha, hb;
513 timed_driver_pair d(duration(2000), ha, hb);
514
515 proton::sender s = d.a.connection().open_sender("x");
516 d.process_timed_fail();
517 proton::message m("barefoot_timed_fail");
518 m.properties().put("x", "y");
519 m.message_annotations().put("a", "b");
520 s.send(m);
521
522 d.process_timed_fail();
523
524 ASSERT_THROWS(test::error,
525 while (hb.messages.size() == 0) {
526 d.process_timed_fail();
527 }
528 );
529
530 ASSERT_EQUAL(1u, hb.transport_errors.size());
531 ASSERT_EQUAL("amqp:resource-limit-exceeded: local-idle-timeout expired", d.b.transport().error().what());
532 ASSERT_EQUAL(1u, ha.connection_errors.size());
533 ASSERT_EQUAL("amqp:resource-limit-exceeded: local-idle-timeout expired", d.a.connection().error().what());
534}
535}
536
537int main(int argc, char** argv) {

Callers 1

mainFunction · 0.85

Calls 11

process_timed_failMethod · 0.80
durationClass · 0.50
open_senderMethod · 0.45
connectionMethod · 0.45
putMethod · 0.45
propertiesMethod · 0.45
sendMethod · 0.45
sizeMethod · 0.45
whatMethod · 0.45
errorMethod · 0.45
transportMethod · 0.45

Tested by

no test coverage detected