diff --git a/TestON/tests/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HAfullNetPartition/HAfullNetPartition.py
index cebf43e..361da8d 100644
--- a/TestON/tests/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HAfullNetPartition/HAfullNetPartition.py
@@ -2842,36 +2842,29 @@
             onfail="Something went wrong with installing Leadership election" )
 
         main.step( "Run for election on each node" )
-        leaderResult = main.TRUE
-        leaders = []
         for i in main.activeNodes:
             main.CLIs[i].electionTestRun()
-        for i in main.activeNodes:
-            cli = main.CLIs[i]
-            leader = cli.electionTestLeader()
-            if leader is None or leader == main.FALSE:
-                main.log.error( cli.name + ": Leader for the election app " +
-                                 "should be an ONOS node, instead got '" +
-                                 str( leader ) + "'" )
-                leaderResult = main.FALSE
-            leaders.append( leader )
+        time.sleep(5)
+        activeCLIs = [ main.CLIs[i] for i in main.activeNodes ]
+        sameResult, leaders = main.HA.consistentLeaderboards( activeCLIs )
         utilities.assert_equals(
-            expect=main.TRUE,
-            actual=leaderResult,
-            onpass="Successfully ran for leadership",
-            onfail="Failed to run for leadership" )
+            expect=True,
+            actual=sameResult,
+            onpass="All nodes see the same leaderboards",
+            onfail="Inconsistent leaderboards" )
 
-        main.step( "Check that each node shows the same leader" )
-        sameLeader = main.TRUE
-        if len( set( leaders ) ) != 1:
-            sameLeader = main.FALSE
-            main.log.error( "Results of electionTestLeader is order of main.CLIs:" +
-                            str( leaders ) )
-        utilities.assert_equals(
-            expect=main.TRUE,
-            actual=sameLeader,
-            onpass="Leadership is consistent for the election topic",
-            onfail="Nodes have different leaders" )
+        if sameResult:
+            leader = leaders[ 0 ][ 0 ]
+            if main.nodes[main.activeNodes[0]].ip_address in leader:
+                correctLeader = True
+            else:
+                correctLeader = False
+            main.step( "First node was elected leader" )
+            utilities.assert_equals(
+                expect=True,
+                actual=correctLeader,
+                onpass="Correct leader was elected",
+                onfail="Incorrect leader" )
 
     def CASE15( self, main ):
         """
@@ -2971,8 +2964,7 @@
                 main.log.error( "No leader was elected on at least 1 node" )
                 if not expectNoLeader:
                     newLeaderResult = False
-            else:
-                newLeader = newLeaders[ 0 ][ 0 ]
+            newLeader = newLeaders[ 0 ][ 0 ]
 
         # Check that the new leader is not the older leader, which was withdrawn
         if newLeader == oldLeader:
