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

Function test_message

cpp/src/connection_driver_test.cpp:469–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

467}
468
469void test_message() {
470 // Verify a message arrives intact
471 record_handler ha, hb;
472 driver_pair d(ha, hb);
473
474 proton::sender s = d.a.connection().open_sender("x");
475 proton::message m("barefoot");
476 m.properties().put("x", "y");
477 m.message_annotations().put("a", "b");
478 s.send(m);
479
480 while (hb.messages.size() == 0)
481 d.process();
482
483 proton::message m2 = quick_pop(hb.messages);
484 ASSERT_EQUAL(value("barefoot"), m2.body());
485 ASSERT_EQUAL(value("y"), m2.properties().get("x"));
486 ASSERT_EQUAL(value("b"), m2.message_annotations().get("a"));
487}
488
489void test_message_timeout_succeed() {
490 // Verify a message arrives intact

Callers 1

mainFunction · 0.85

Calls 11

quick_popFunction · 0.85
bodyMethod · 0.80
valueFunction · 0.50
open_senderMethod · 0.45
connectionMethod · 0.45
putMethod · 0.45
propertiesMethod · 0.45
sendMethod · 0.45
sizeMethod · 0.45
processMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected