NO-JIRA fix flaky ReplicatedMultipleFailbackTest NPE

This commit is contained in:
franz1981 2021-03-05 14:49:43 +01:00 committed by clebertsuconic
parent 2826c8abe1
commit 57e85bbc10
1 changed files with 8 additions and 4 deletions

View File

@ -98,10 +98,14 @@ public class ReplicatedMultipleFailbackTest extends SmokeTestBase {
Map<String, Pair<String, String>> 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;
}