unskip a test
@@ -8,13 +8,12 @@ from plenum.test.malicious_behaviors_node import slow_primary
from plenum.test.test_node import getPrimaryReplica, ensureElectionsDone
from plenum.test.pool_transactions.conftest import clientAndWallet1, client1, \
wallet1, client1Connected, looper
-from plenum.test.view_change.helper import provoke_and_wait_for_view_change
+from plenum.test.view_change.helper import provoke_and_wait_for_view_change, ensure_view_change
from stp_core.common.log import getlogger
logger = getlogger()
-@pytest.mark.skip(reason='SOV-1020')
def test_master_primary_different_from_previous(txnPoolNodeSet,
looper, client1,
wallet1, client1Connected):
@@ -23,19 +22,16 @@ def test_master_primary_different_from_previous(txnPoolNodeSet,
master instance, it does not matter for other instance. The primary is
benign and does not vote for itself.
"""
- old_view_no = checkViewNoForNodes(txnPoolNodeSet)
pr = slow_primary(txnPoolNodeSet, 0, delay=10)
old_pr_node_name = pr.node.name
# View change happens
- provoke_and_wait_for_view_change(looper,
- txnPoolNodeSet,
- old_view_no + 1,
- wallet1,
- client1)
+ ensure_view_change(looper, txnPoolNodeSet)
logger.debug("VIEW HAS BEEN CHANGED!")
+
# Elections done
ensureElectionsDone(looper=looper, nodes=txnPoolNodeSet)
+
# New primary is not same as old primary
assert getPrimaryReplica(txnPoolNodeSet, 0).node.name != old_pr_node_name
@@ -46,7 +42,7 @@ def test_master_primary_different_from_previous(txnPoolNodeSet,
-@pytest.mark.skip(reason='SOV-1020')
+@pytest.mark.skip(reason='Nodes use round robin primary selection')
def test_master_primary_different_from_previous_view_for_itself(txnPoolNodeSet,
looper, client1,
wallet1, client1Connected):
