-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into track-req
- Loading branch information
Showing
6 changed files
with
46 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
plenum/test/pool_transactions/test_add_inactive_node_then_activate.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import pytest | ||
|
||
from plenum.test.node_request.helper import sdk_ensure_pool_functional | ||
from plenum.common.util import randomString | ||
from plenum.test.pool_transactions.helper import sdk_add_new_steward_and_node, sdk_pool_refresh, \ | ||
update_node_data_and_reconnect | ||
from plenum.test.test_node import checkNodesConnected | ||
from stp_core.common.log import getlogger | ||
|
||
|
||
logger = getlogger() | ||
|
||
|
||
def testAddInactiveNodeThenActivate(looper, txnPoolNodeSet, | ||
sdk_wallet_steward, | ||
sdk_pool_handle, tdir, tconf, allPluginsPath): | ||
new_steward_name = "testClientSteward" + randomString(3) | ||
new_node_name = "Kappa" | ||
|
||
# adding a new node without SERVICES field | ||
# it means the node is in the inactive state | ||
new_steward_wallet, new_node = \ | ||
sdk_add_new_steward_and_node(looper, | ||
sdk_pool_handle, | ||
sdk_wallet_steward, | ||
new_steward_name, | ||
new_node_name, | ||
tdir, | ||
tconf, | ||
allPluginsPath, | ||
services=None) | ||
looper.run(checkNodesConnected(txnPoolNodeSet)) | ||
sdk_pool_refresh(looper, sdk_pool_handle) | ||
new_node = update_node_data_and_reconnect(looper, txnPoolNodeSet + [new_node], | ||
new_steward_wallet, | ||
sdk_pool_handle, | ||
new_node, | ||
None, None, | ||
None, None, | ||
tdir, tconf) | ||
txnPoolNodeSet.append(new_node) | ||
sdk_ensure_pool_functional(looper, txnPoolNodeSet, new_steward_wallet, sdk_pool_handle) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters