You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2017/06/14 19:13:32 UTC
[1/2] qpid-proton git commit: NO-JIRA: c++ enable SSL example tests.
Repository: qpid-proton
Updated Branches:
refs/heads/master 98baece77 -> cb91969f3
NO-JIRA: c++ enable SSL example tests.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/95491a05
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/95491a05
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/95491a05
Branch: refs/heads/master
Commit: 95491a050891fd91d0b848c903e5991ab4cc6930
Parents: 98baece
Author: Alan Conway <ac...@redhat.com>
Authored: Tue Jun 13 17:48:37 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Tue Jun 13 17:48:37 2017 -0400
----------------------------------------------------------------------
examples/cpp/CMakeLists.txt | 5 +++++
examples/cpp/example_test.py | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/95491a05/examples/cpp/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
index ecd88cf..7da4834 100644
--- a/examples/cpp/CMakeLists.txt
+++ b/examples/cpp/CMakeLists.txt
@@ -69,5 +69,10 @@ endif()
add_cpp_test(cpp-example-container ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example_test.py -v ContainerExampleTest)
+if (NOT SSL_IMPL STREQUAL none)
+add_cpp_test(cpp-example-container-ssl ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/example_test.py -v ContainerExampleSSLTest)
+endif()
+
+
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/95491a05/examples/cpp/example_test.py
----------------------------------------------------------------------
diff --git a/examples/cpp/example_test.py b/examples/cpp/example_test.py
index 0ae929c..98f1d90 100644
--- a/examples/cpp/example_test.py
+++ b/examples/cpp/example_test.py
@@ -244,13 +244,13 @@ class ContainerExampleSSLTest(BrokerTestCase):
broker_exe = "broker"
def setUp(self):
- if not SSL.present:
- self.skip("SSL not available")
+ super(ContainerExampleSSLTest, self).setUp()
self.vg_args = Proc.vg_args
Proc.vg_args = [] # Disable
def tearDown(self):
Proc.vg_args = self.vg_args
+ super(ContainerExampleSSLTest, self).tearDown()
def ssl_certs_dir(self):
"""Absolute path to the test SSL certificates"""
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[2/2] qpid-proton git commit: PROTON-1498: Message annotation_map
works as value, but not as ref
Posted by ac...@apache.org.
PROTON-1498: Message annotation_map works as value, but not as ref
Already fixed by previous commits, added a regression test.
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/cb91969f
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/cb91969f
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/cb91969f
Branch: refs/heads/master
Commit: cb91969f3cbd14f7d01e831a45d8d1ccaa19b1f6
Parents: 95491a0
Author: Alan Conway <ac...@redhat.com>
Authored: Wed Jun 14 14:47:37 2017 -0400
Committer: Alan Conway <ac...@redhat.com>
Committed: Wed Jun 14 14:48:58 2017 -0400
----------------------------------------------------------------------
proton-c/bindings/cpp/src/message_test.cpp | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/cb91969f/proton-c/bindings/cpp/src/message_test.cpp
----------------------------------------------------------------------
diff --git a/proton-c/bindings/cpp/src/message_test.cpp b/proton-c/bindings/cpp/src/message_test.cpp
index 0d7229f..4508216 100644
--- a/proton-c/bindings/cpp/src/message_test.cpp
+++ b/proton-c/bindings/cpp/src/message_test.cpp
@@ -139,11 +139,14 @@ void test_message_maps() {
m.properties().put("foo", 12);
m.delivery_annotations().put("bar", "xyz");
- m.message_annotations().put(23, "23");
+ m.message_annotations().put(23, int8_t(42));
ASSERT_EQUAL(m.properties().get("foo"), scalar(12));
ASSERT_EQUAL(m.delivery_annotations().get("bar"), scalar("xyz"));
- ASSERT_EQUAL(m.message_annotations().get(23), scalar("23"));
+
+ ASSERT_EQUAL(m.message_annotations().get(23), scalar(int8_t(42)));
+ ASSERT_EQUAL(proton::get<int8_t>(m.message_annotations().get(23)), 42);
+ ASSERT_EQUAL(m.message_annotations().get(23).get<int8_t>(), 42);
message m2(m);
@@ -151,7 +154,7 @@ void test_message_maps() {
ASSERT_EQUAL(m2.properties().get("foo"), scalar(12));
ASSERT_EQUAL(m2.delivery_annotations().get("bar"), scalar("xyz"));
- ASSERT_EQUAL(m2.message_annotations().get(23), scalar("23"));
+ ASSERT_EQUAL(m2.message_annotations().get(23), scalar(int8_t(42)));
m.properties().put("foo","newfoo");
m.delivery_annotations().put(24, 1000);
@@ -165,6 +168,18 @@ void test_message_maps() {
ASSERT_EQUAL(m3.delivery_annotations().get("bar"), scalar("xyz"));
ASSERT_EQUAL(m3.delivery_annotations().get(24), scalar(1000));
ASSERT(m3.message_annotations().empty());
+
+ // PROTON-1498
+ message msg;
+ msg.message_annotations().put("x-opt-jms-msg-type", int8_t(1));
+
+ proton::message::annotation_map& am_ref = msg.message_annotations();
+ uint8_t t = am_ref.get(proton::symbol("x-opt-jms-msg-type")).get<int8_t>();
+ ASSERT_EQUAL(1, t);
+
+ proton::message::annotation_map am_val = msg.message_annotations();
+ t = am_val.get(proton::symbol("x-opt-jms-msg-type")).get<int8_t>();
+ ASSERT_EQUAL(1, t);
}
void test_message_reuse() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org