Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into track-req
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Khoroshavin committed Apr 12, 2018
2 parents 9994f0c + a19beaa commit 9b64056
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 33 deletions.
2 changes: 1 addition & 1 deletion ci/ubuntu.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN echo "To invalidate cache"
RUN apt-get update -y && apt-get install -y \
python3-nacl \
libindy-crypto=0.2.0 \
libindy=1.3.1~452 \
libindy=1.3.1~454 \
# rocksdb python wrapper
libbz2-dev \
zlib1g-dev \
Expand Down
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)
31 changes: 0 additions & 31 deletions plenum/test/pool_transactions/test_nodes_data_changed.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,3 @@ def testNodePortChanged(looper, txnPoolNodeSet,
cli_ha.host, cli_ha.port,
tdir, tconf)
sdk_ensure_pool_functional(looper, txnPoolNodeSet, new_steward_wallet, sdk_pool_handle)


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)
1 change: 1 addition & 0 deletions plenum/test/script/test_change_non_primary_node_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'conflicting address', 'unable to send message',
'got error while verifying message']

TestRunningTimeLimitSec = 200

@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
def testChangeNodeHaForNonPrimary(looper, txnPoolNodeSet, tdirWithClientPoolTxns,
Expand Down
1 change: 1 addition & 0 deletions plenum/test/script/test_change_primary_node_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'conflicting address', 'unable to send message',
'got error while verifying message']

TestRunningTimeLimitSec = 200

@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
def testChangeNodeHaForPrimary(looper, txnPoolNodeSet, tdirWithClientPoolTxns,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Load the metadata using exec() so we don't trigger an import of ioflo.__init__
exec(compile(open(METADATA).read(), METADATA, 'exec'))

tests_require = ['pytest', 'pytest-xdist', 'python3-indy==1.3.1-dev-452']
tests_require = ['pytest', 'pytest-xdist', 'python3-indy==1.3.1-dev-454']

setup(
name='indy-plenum-dev',
Expand Down

0 comments on commit 9b64056

Please sign in to comment.