Skip to content

Commit a19beaa

Browse files
anikitinDSRandkononykhin
anikitinDSR
authored andcommitted
New libindy 454 (#628)
* make test as a separate module due to several tests changing genesis nodes Signed-off-by: dsurnin <[email protected]> * new libindy 454 Signed-off-by: dsurnin <[email protected]> * move test to separate file Signed-off-by: dsurnin <[email protected]> * remove unused imports Signed-off-by: dsurnin <[email protected]> * [Increment sdk 454] Increase test running time Signed-off-by: Andrew Nikitin <[email protected]>
1 parent 55232e1 commit a19beaa

6 files changed

+46
-33
lines changed

ci/ubuntu.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ RUN echo "To invalidate cache"
1010
RUN apt-get update -y && apt-get install -y \
1111
python3-nacl \
1212
libindy-crypto=0.2.0 \
13-
libindy=1.3.1~452 \
13+
libindy=1.3.1~454 \
1414
# rocksdb python wrapper
1515
libbz2-dev \
1616
zlib1g-dev \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import pytest
2+
3+
from plenum.test.node_request.helper import sdk_ensure_pool_functional
4+
from plenum.common.util import randomString
5+
from plenum.test.pool_transactions.helper import sdk_add_new_steward_and_node, sdk_pool_refresh, \
6+
update_node_data_and_reconnect
7+
from plenum.test.test_node import checkNodesConnected
8+
from stp_core.common.log import getlogger
9+
10+
11+
logger = getlogger()
12+
13+
14+
def testAddInactiveNodeThenActivate(looper, txnPoolNodeSet,
15+
sdk_wallet_steward,
16+
sdk_pool_handle, tdir, tconf, allPluginsPath):
17+
new_steward_name = "testClientSteward" + randomString(3)
18+
new_node_name = "Kappa"
19+
20+
# adding a new node without SERVICES field
21+
# it means the node is in the inactive state
22+
new_steward_wallet, new_node = \
23+
sdk_add_new_steward_and_node(looper,
24+
sdk_pool_handle,
25+
sdk_wallet_steward,
26+
new_steward_name,
27+
new_node_name,
28+
tdir,
29+
tconf,
30+
allPluginsPath,
31+
services=None)
32+
looper.run(checkNodesConnected(txnPoolNodeSet))
33+
sdk_pool_refresh(looper, sdk_pool_handle)
34+
new_node = update_node_data_and_reconnect(looper, txnPoolNodeSet + [new_node],
35+
new_steward_wallet,
36+
sdk_pool_handle,
37+
new_node,
38+
None, None,
39+
None, None,
40+
tdir, tconf)
41+
txnPoolNodeSet.append(new_node)
42+
sdk_ensure_pool_functional(looper, txnPoolNodeSet, new_steward_wallet, sdk_pool_handle)

plenum/test/pool_transactions/test_nodes_data_changed.py

-31
Original file line numberDiff line numberDiff line change
@@ -79,34 +79,3 @@ def testNodePortChanged(looper, txnPoolNodeSet,
7979
cli_ha.host, cli_ha.port,
8080
tdir, tconf)
8181
sdk_ensure_pool_functional(looper, txnPoolNodeSet, new_steward_wallet, sdk_pool_handle)
82-
83-
84-
def testAddInactiveNodeThenActivate(looper, txnPoolNodeSet,
85-
sdk_wallet_steward,
86-
sdk_pool_handle, tdir, tconf, allPluginsPath):
87-
new_steward_name = "testClientSteward" + randomString(3)
88-
new_node_name = "Kappa"
89-
90-
# adding a new node without SERVICES field
91-
# it means the node is in the inactive state
92-
new_steward_wallet, new_node = \
93-
sdk_add_new_steward_and_node(looper,
94-
sdk_pool_handle,
95-
sdk_wallet_steward,
96-
new_steward_name,
97-
new_node_name,
98-
tdir,
99-
tconf,
100-
allPluginsPath,
101-
services=None)
102-
looper.run(checkNodesConnected(txnPoolNodeSet))
103-
sdk_pool_refresh(looper, sdk_pool_handle)
104-
new_node = update_node_data_and_reconnect(looper, txnPoolNodeSet + [new_node],
105-
new_steward_wallet,
106-
sdk_pool_handle,
107-
new_node,
108-
None, None,
109-
None, None,
110-
tdir, tconf)
111-
txnPoolNodeSet.append(new_node)
112-
sdk_ensure_pool_functional(looper, txnPoolNodeSet, new_steward_wallet, sdk_pool_handle)

plenum/test/script/test_change_non_primary_node_ha.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'conflicting address', 'unable to send message',
1111
'got error while verifying message']
1212

13+
TestRunningTimeLimitSec = 200
1314

1415
@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
1516
def testChangeNodeHaForNonPrimary(looper, txnPoolNodeSet, tdirWithClientPoolTxns,

plenum/test/script/test_change_primary_node_ha.py

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'conflicting address', 'unable to send message',
1212
'got error while verifying message']
1313

14+
TestRunningTimeLimitSec = 200
1415

1516
@pytest.mark.skipif('sys.platform == "win32"', reason='SOV-330')
1617
def testChangeNodeHaForPrimary(looper, txnPoolNodeSet, tdirWithClientPoolTxns,

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
# Load the metadata using exec() so we don't trigger an import of ioflo.__init__
3131
exec(compile(open(METADATA).read(), METADATA, 'exec'))
3232

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

3535
setup(
3636
name='indy-plenum-dev',

0 commit comments

Comments
 (0)