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

    sendRandomRequests(wallet1, client1, 10)

    waitRejectFromPoolWithReason(looper, nodeSet, client1, 'Can not process requests when view change is in progress')

    for node in nodeSet:
        check_replica_queue_empty(node)
Example #2
0
def test_no_requests_processed_during_view_change(looper, txnPoolNodeSet,
                                                  sdk_pool_handle, sdk_wallet_client):
    for node in txnPoolNodeSet:
        node.view_change_in_progress = True

    with pytest.raises(RequestRejectedException) as e:
        sdk_send_random_and_check(looper, txnPoolNodeSet,
                                  sdk_pool_handle, sdk_wallet_client, 10)
    assert 'Can not process requests when view change is in progress' in \
           e._excinfo[1].args[0]

    for node in txnPoolNodeSet:
        check_replica_queue_empty(node)