You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/04/12 21:32:16 UTC
[qpid-proton] branch master updated (5b6ed8e -> 9ff0a64)
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git.
from 5b6ed8e PROTON-2027: use make_work instead of lambda for wider platform coverage
new be0b0c2 PROTON-2018: Don't use a fixed port for the ssl proactor test
new 9ff0a64 NO-JIRA: Don't fail Azure MacOS build if brew upgrade fails
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
azure-pipelines/azure-pipelines.yml | 2 +-
c/tests/ssl_proactor_test.cpp | 54 ++++++++++++++++++++++++++-----------
2 files changed, 39 insertions(+), 17 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[qpid-proton] 01/02: PROTON-2018: Don't use a fixed port for the
ssl proactor test
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit be0b0c277d5cdeeb2e7430b40d1b370b4d1425c9
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Apr 12 16:56:57 2019 -0400
PROTON-2018: Don't use a fixed port for the ssl proactor test
---
c/tests/ssl_proactor_test.cpp | 54 ++++++++++++++++++++++++++++++-------------
1 file changed, 38 insertions(+), 16 deletions(-)
diff --git a/c/tests/ssl_proactor_test.cpp b/c/tests/ssl_proactor_test.cpp
index 559d984..09e3031 100644
--- a/c/tests/ssl_proactor_test.cpp
+++ b/c/tests/ssl_proactor_test.cpp
@@ -162,6 +162,36 @@ void run(pn_proactor_t *p, app_data_t *app, handler_t *shandler, handler_t *chan
} while(true);
}
+static void run_until_listener_open(pn_proactor_t* p) {
+ do {
+ pn_event_batch_t *events = pn_proactor_wait(p);
+ pn_event_t *e;
+ for (e = pn_event_batch_next(events); e; e = pn_event_batch_next(events)) {
+ if (pn_event_type(e)==PN_LISTENER_OPEN) {
+ pn_proactor_done(p, events);
+ return;
+ }
+ }
+ pn_proactor_done(p, events);
+ } while (true);
+}
+
+static void setup_connection(pn_proactor_t* proactor, pn_transport_t* t) {
+ pn_listener_t* l = pn_listener();
+ pn_proactor_listen(proactor, l, ":0", 16);
+ // Don't know port until the listener is open
+ run_until_listener_open(proactor);
+
+ // Construct connect address (from listener port)
+ const pn_netaddr_t* a = pn_listener_addr(l);
+ char port[32];
+ port[0] = ':';
+ pn_netaddr_host_port(a, NULL, 0, port+1, 31);
+
+ INFO("Connecting to " << port);
+ pn_proactor_connect2(proactor, NULL, t, port);
+}
+
TEST_CASE("ssl certificate verification tests") {
struct app_data_t app = {0};
@@ -185,8 +215,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_init(pn_ssl(t), NULL, NULL) == 0);
REQUIRE(pn_ssl_set_peer_hostname(pn_ssl(t), "test_server") == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==false);
@@ -199,8 +228,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER, NULL) == 0);
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==true);
@@ -212,8 +240,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER, NULL) == 0);
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==false);
@@ -227,8 +254,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
REQUIRE(pn_ssl_set_peer_hostname(pn_ssl(t), "test_server") == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==true);
@@ -240,8 +266,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_VERIFY_PEER_NAME, NULL) == 0);
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==false);
@@ -253,8 +278,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_ANONYMOUS_PEER, NULL) == 0);
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==true);
@@ -268,8 +292,7 @@ TEST_CASE("ssl certificate verification tests") {
app.server_ssl_domain = 0;
REQUIRE(pn_ssl_init(pn_ssl(t), NULL, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==false);
@@ -282,8 +305,7 @@ TEST_CASE("ssl certificate verification tests") {
REQUIRE(pn_ssl_domain_set_peer_authentication(cd, PN_SSL_ANONYMOUS_PEER, NULL) == 0);
REQUIRE(pn_ssl_init(pn_ssl(t), cd, NULL) == 0);
- pn_proactor_listen(proactor, pn_listener(), "", 16);
- pn_proactor_connect2(proactor, NULL, t, "");
+ setup_connection(proactor, t);
run(proactor, &app, server_handler, client_handler);
CHECK(app.connection_succeeded==true);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org
[qpid-proton] 02/02: NO-JIRA: Don't fail Azure MacOS build if brew
upgrade fails
Posted by as...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git
commit 9ff0a644032f26159862cc9441df59ffa4b3462f
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Fri Apr 12 17:23:29 2019 -0400
NO-JIRA: Don't fail Azure MacOS build if brew upgrade fails
---
azure-pipelines/azure-pipelines.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/azure-pipelines/azure-pipelines.yml b/azure-pipelines/azure-pipelines.yml
index fd50140..b34dfe8 100644
--- a/azure-pipelines/azure-pipelines.yml
+++ b/azure-pipelines/azure-pipelines.yml
@@ -48,6 +48,6 @@ jobs:
- script: |
brew update
brew install libuv swig pkgconfig openssl@1.1 jsoncpp
- brew upgrade python@3 python@2
+ brew upgrade python@3 python@2 || true
name: InstallExtraStuff
- template: steps.yml
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org