From 57e85bbc10d055bb0e2007a8b5f9817f4b97a265 Mon Sep 17 00:00:00 2001 From: franz1981 Date: Fri, 5 Mar 2021 14:49:43 +0100 Subject: [PATCH] NO-JIRA fix flaky ReplicatedMultipleFailbackTest NPE --- .../ReplicatedMultipleFailbackTest.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java index f354fe69f8..95a2346b33 100644 --- a/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java +++ b/tests/smoke-tests/src/test/java/org/apache/activemq/artemis/tests/smoke/jmxmultiplefailback/ReplicatedMultipleFailbackTest.java @@ -98,10 +98,14 @@ public class ReplicatedMultipleFailbackTest extends SmokeTestBase { Map> networkTopology = new HashMap<>(nodeCount); for (int i = 0; i < nodeCount; i++) { final JsonObject nodePair = nodeIDs.getJsonObject(i); - final String nodeID = nodePair.getString("nodeID"); - final String live = nodePair.getString("live"); - final String backup = nodePair.getString("backup", null); - networkTopology.put(nodeID, new Pair<>(live, backup)); + try { + final String nodeID = nodePair.getString("nodeID"); + final String live = nodePair.getString("live"); + final String backup = nodePair.getString("backup", null); + networkTopology.put(nodeID, new Pair<>(live, backup)); + } catch (Exception e) { + LOGGER.warnf(e, "Error on %s", nodePair); + } } return networkTopology; }