Merge "Fixed error printout in CASE15 Elections"
diff --git a/TestON/tests/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HAclusterRestart/HAclusterRestart.py
index 1169a7d..7197d5e 100644
--- a/TestON/tests/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HAclusterRestart/HAclusterRestart.py
@@ -2881,10 +2881,14 @@
             oldLeader = oldLeaders[ 0 ]
 
         # Check that each node's candidate list is the same
+        candidateDiscrepancy = False  # Boolean of candidate mismatches
         for candidates in oldAllCandidates:
             if set( candidates ) != set( oldCandidates ):
                 sameResult = main.FALSE
-                failMessage += "and candidates"
+                candidateDiscrepancy = True
+
+        if candidateDiscrepancy:
+            failMessage += " and candidates"
 
         utilities.assert_equals(
             expect=main.TRUE,
diff --git a/TestON/tests/HAkillNodes/HAkillNodes.py b/TestON/tests/HAkillNodes/HAkillNodes.py
index 4c61769..9bfe947 100644
--- a/TestON/tests/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HAkillNodes/HAkillNodes.py
@@ -2877,10 +2877,15 @@
             oldLeader = oldLeaders[ 0 ]
 
         # Check that each node's candidate list is the same
+        candidateDiscrepancy = False  # Boolean of candidate mismatches
         for candidates in oldAllCandidates:
             if set( candidates ) != set( oldCandidates ):
                 sameResult = main.FALSE
-                failMessage += "and candidates"
+                candidateDiscrepancy = True
+
+        if candidateDiscrepancy:
+            failMessage += " and candidates"
+            
         utilities.assert_equals(
             expect=main.TRUE,
             actual=sameResult,
diff --git a/TestON/tests/HAsanity/HAsanity.py b/TestON/tests/HAsanity/HAsanity.py
index 3ea2cde..c64e05e 100644
--- a/TestON/tests/HAsanity/HAsanity.py
+++ b/TestON/tests/HAsanity/HAsanity.py
@@ -2780,10 +2780,14 @@
             oldLeader = oldLeaders[ 0 ]
 
         # Check that each node's candidate list is the same
+        candidateDiscrepancy = False  # Boolean of candidate mismatches
         for candidates in oldAllCandidates:
             if set( candidates ) != set( oldCandidates ):
                 sameResult = main.FALSE
-                failMessage += "and candidates"
+                candidateDiscrepancy = True
+
+        if candidateDiscrepancy:
+            failMessage += " and candidates"
 
         utilities.assert_equals(
             expect=main.TRUE,
diff --git a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index 0883484..a1652e9 100644
--- a/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -1954,10 +1954,14 @@
             oldLeader = oldLeaders[ 0 ]
 
         # Check that each node's candidate list is the same
+        candidateDiscrepancy = False  # Boolean of candidate mismatches
         for candidates in oldAllCandidates:
             if set( candidates ) != set( oldCandidates ):
                 sameResult = main.FALSE
-                failMessage += "and candidates"
+                candidateDiscrepancy = True
+
+        if candidateDiscrepancy:
+            failMessage += " and candidates"
 
         utilities.assert_equals(
             expect=main.TRUE,
diff --git a/TestON/tests/HAstopNodes/HAstopNodes.py b/TestON/tests/HAstopNodes/HAstopNodes.py
index c6e584f..1088374 100644
--- a/TestON/tests/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HAstopNodes/HAstopNodes.py
@@ -2866,10 +2866,15 @@
             oldLeader = oldLeaders[ 0 ]
 
         # Check that each node's candidate list is the same
+        candidateDiscrepancy = False  # Boolean of candidate mismatches
         for candidates in oldAllCandidates:
             if set( candidates ) != set( oldCandidates ):
                 sameResult = main.FALSE
-                failMessage += "and candidates"
+                candidateDiscrepancy = True
+
+        if candidateDiscrepancy:
+            failMessage += " and candidates"
+            
         utilities.assert_equals(
             expect=main.TRUE,
             actual=sameResult,