From 2c1791ec89ada606ca369814679912694eed586a Mon Sep 17 00:00:00 2001 From: Andrej Mitrovic Date: Mon, 10 Aug 2020 17:15:07 +0900 Subject: [PATCH 1/2] Fix propagation of HTTPStatusException We need to handle vibe.d exceptions properly, if an HTTPStatusException is thrown we need to propagate it to the calling code so it can be properly handled. --- source/agora/network/NetworkClient.d | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/agora/network/NetworkClient.d b/source/agora/network/NetworkClient.d index 08887036d94..169992819ab 100644 --- a/source/agora/network/NetworkClient.d +++ b/source/agora/network/NetworkClient.d @@ -325,6 +325,10 @@ class NetworkClient } catch (Exception ex) { + import vibe.http.common : HTTPStatusException; + if (auto http = cast(HTTPStatusException)ex) + throw http; // e.g. getPublicKey() might not be implemented + try { log.format(log_level, "Request '{}' to {} failed: {}", From a8e7c3f6bc2cfda9afcedd70dcf93cad47ca463c Mon Sep 17 00:00:00 2001 From: Andrej Mitrovic Date: Mon, 10 Aug 2020 16:46:14 +0900 Subject: [PATCH 2/2] Integration: Force all nodes to connect to each other It might resolve the CircleCI failures, but it would only treat the symptom and not solve the underlying problem. --- tests/system/node/2/config.yaml | 3 ++- tests/system/node/3/config.yaml | 3 ++- tests/system/node/4/config.yaml | 3 ++- tests/system/node/5/config.yaml | 3 ++- tests/system/node/6/config.yaml | 3 ++- tests/system/node/7/config.yaml | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/system/node/2/config.yaml b/tests/system/node/2/config.yaml index 6aeb76cb0e6..b66f0c38922 100644 --- a/tests/system/node/2/config.yaml +++ b/tests/system/node/2/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 2826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-3:3826 - http://node-4:4826 - http://node-5:5826 diff --git a/tests/system/node/3/config.yaml b/tests/system/node/3/config.yaml index e3c5c921d24..613b2a3f6c2 100644 --- a/tests/system/node/3/config.yaml +++ b/tests/system/node/3/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 3826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-2:2826 - http://node-4:4826 - http://node-5:5826 diff --git a/tests/system/node/4/config.yaml b/tests/system/node/4/config.yaml index 5afb1729518..4dd43c37148 100644 --- a/tests/system/node/4/config.yaml +++ b/tests/system/node/4/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 4826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-2:2826 - http://node-3:3826 - http://node-5:5826 diff --git a/tests/system/node/5/config.yaml b/tests/system/node/5/config.yaml index d2b9584ab70..5fd929173fe 100644 --- a/tests/system/node/5/config.yaml +++ b/tests/system/node/5/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 5826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-2:2826 - http://node-3:3826 - http://node-4:4826 diff --git a/tests/system/node/6/config.yaml b/tests/system/node/6/config.yaml index 0e94aaf6081..d50f9cdb2ed 100644 --- a/tests/system/node/6/config.yaml +++ b/tests/system/node/6/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 6826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-2:2826 - http://node-3:3826 - http://node-4:4826 diff --git a/tests/system/node/7/config.yaml b/tests/system/node/7/config.yaml index 2caadc64413..286814664f8 100644 --- a/tests/system/node/7/config.yaml +++ b/tests/system/node/7/config.yaml @@ -3,7 +3,7 @@ ################################################################################ node: is_validator: true - min_listeners: 6 + min_listeners: 7 max_listeners: 10 address: 0.0.0.0 port: 7826 @@ -38,6 +38,7 @@ banman: ################################################################################ network: # Supported value: IPv4, IPv6 + - http://node-0:1826 - http://node-2:2826 - http://node-3:3826 - http://node-4:4826