def test_no_new_view_3pc_messages_processed_during_view_change(
        looper, nodeSet, client1, wallet1):
    for node in nodeSet:
        node.view_change_in_progress = True

    new_view_no = getPrimaryReplica(nodeSet).node.viewNo + 1
    pp_seq_no = 1

    send_pre_prepare(new_view_no, pp_seq_no, wallet1, nodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(nodeSet)

    send_prepare(new_view_no, pp_seq_no, nodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(nodeSet)

    send_commit(new_view_no, pp_seq_no, nodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(nodeSet)
def test_no_new_view_3pc_messages_processed_during_view_change(
        looper, txnPoolNodeSet):
    for node in txnPoolNodeSet:
        node.view_change_in_progress = True

    new_view_no = getPrimaryReplica(txnPoolNodeSet).node.viewNo + 1
    pp_seq_no = 1

    send_pre_prepare(new_view_no, pp_seq_no, txnPoolNodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(txnPoolNodeSet)

    send_prepare(new_view_no, pp_seq_no, txnPoolNodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(txnPoolNodeSet)

    send_commit(new_view_no, pp_seq_no, txnPoolNodeSet)
    looper.runFor(1)
    check_all_replica_queue_empty(txnPoolNodeSet)