Skip to content

Commit

Permalink
Merge pull request #637 from anikitinDSR/failed-test
Browse files Browse the repository at this point in the history
[Fixed failed tests] Decrease reconnect timeout and ensure the same data
  • Loading branch information
ashcherbakov authored Apr 19, 2018
2 parents 851ad6f + ce485f7 commit 6090d21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@
def limitTestRunningTime():
return 200

@pytest.fixture(scope="module")
def tconf(tconf):
old_timeout_restricted = tconf.RETRY_TIMEOUT_RESTRICTED
old_timeout_not_restricted = tconf.RETRY_TIMEOUT_NOT_RESTRICTED
tconf.RETRY_TIMEOUT_RESTRICTED = 2
tconf.RETRY_TIMEOUT_NOT_RESTRICTED = 2
yield tconf

tconf.RETRY_TIMEOUT_RESTRICTED = old_timeout_restricted
tconf.RETRY_TIMEOUT_NOT_RESTRICTED = old_timeout_not_restricted


# noinspection PyIncorrectDocstring
def testProtocolInstanceCannotBecomeActiveWithLessThanFourServers(
Expand Down
2 changes: 2 additions & 0 deletions plenum/test/monitoring/test_post_monitoring_stats.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data
from stp_core.loop.eventually import eventually
from plenum.server.monitor import Monitor
from plenum.test.helper import sdk_send_random_and_check
Expand Down Expand Up @@ -33,6 +34,7 @@ def testPostingThroughput(postingStatsEnabled,
sdk_pool_handle,
sdk_wallet_client,
reqCount)
ensure_all_nodes_have_same_data(looper, nodes=txnPoolNodeSet)

for node in txnPoolNodeSet:
assert len(node.monitor.orderedRequestsInLast) == reqCount
Expand Down

0 comments on commit 6090d21

Please sign in to comment.