Skip to content

Commit

Permalink
Merge pull request hyperledger#1122 from Toktar/task-1876-ordering-in…
Browse files Browse the repository at this point in the history
…-catchup

 INDY-1876: bump plenum.
  • Loading branch information
ashcherbakov authored Jan 12, 2019
2 parents 1450396 + 272db34 commit c3154a4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_batch_rejected_on_catchup_start_can_be_ordered_before_ledgers_sync(
disable_transport_batching):
"""
Verifies that a batch rejected due to catch-up start can be successfully
re-applied and ordered later before ledgers synchronization without any
ordered later before ledgers synchronization without any
warnings.
In the test we perform stashing / unstashing messages and patching /
Expand All @@ -75,8 +75,7 @@ def test_batch_rejected_on_catchup_start_can_be_ordered_before_ledgers_sync(
since it is not in participating mode.
11. The slow node receives LEDGER_STATUS messages from the other nodes.
12. Prior to ledgers synchronization the slow node processes the stashed
ORDER messages. When it is processing the ORDER message from the master
replica, it re-applies the batch and orders it.
Commits messages and orders batch.
13. The slow node synchronizes its ledgers and completes the catch-up.
"""

Expand All @@ -86,8 +85,6 @@ def test_batch_rejected_on_catchup_start_can_be_ordered_before_ledgers_sync(
slow_node.nodeIbStasher.delay(cDelay(300))
slow_node.start_catchup = MethodType(patched_start_catchup, slow_node)

send_random_requests(looper, sdk_pool_handle, sdk_wallet_trust_anchor, 1)

no_more_catchups_needed_call_times_before = \
slow_node.spylog.count(Node.no_more_catchups_needed.__name__)
on_batch_rejected_call_times_before = \
Expand All @@ -97,6 +94,8 @@ def test_batch_rejected_on_catchup_start_can_be_ordered_before_ledgers_sync(
process_ordered_call_times_before = \
slow_node.spylog.count(Node.processOrdered.__name__)

send_random_requests(looper, sdk_pool_handle, sdk_wallet_trust_anchor, 1)

slow_node.start_catchup()

def check_catchup_done():
Expand All @@ -119,7 +118,7 @@ def check_catchup_done():
- on_batch_created_call_times_before == 1

assert process_ordered_call_times_after \
- process_ordered_call_times_before == 2 # one per replica
- process_ordered_call_times_before == 1 # one per replica
last_2_process_ordered_results = \
[call.result for call
in slow_node.spylog.getAll(Node.processOrdered.__name__)[-2:]]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
data_files=[(
(BASE_DIR, ['data/nssm_original.exe'])
)],
install_requires=['indy-plenum-dev==1.6.646',
install_requires=['indy-plenum-dev==1.6.652',
'python-dateutil',
'timeout-decorator==0.4.0'],
setup_requires=['pytest-runner'],
Expand Down

0 comments on commit c3154a4

Please sign in to comment.