-
Notifications
You must be signed in to change notification settings - Fork 370
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[INDY-1209] Raise node_request and pool_transactions fixtures and helper functions #579
[INDY-1209] Raise node_request and pool_transactions fixtures and helper functions #579
Conversation
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
…t_state_proof; problem with wrong bls keys Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
…te_proof test Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
…n/INDY-1058 Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
…INDY-1058 Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Test this please |
Test this please |
Signed-off-by: ArtObr <[email protected]>
plenum/test/node_catchup/conftest.py
Outdated
new_steward_name, new_node_name, tdir, tconf, nodeClass=testNodeClass, | ||
allPluginsPath=allPluginsPath, autoStart=True, | ||
do_post_node_creation=do_post_node_creation) | ||
yield looper, new_node, sdk_pool_handle, new_steward_wallet_handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pool refresh is not called here but pool handle is returned
it should be fixed
plenum/test/node_catchup/conftest.py
Outdated
sdk_node_created_after_some_txns | ||
txnPoolNodeSet.append(new_node) | ||
looper.run(checkNodesConnected(txnPoolNodeSet)) | ||
return looper, new_node, sdk_pool_handle, new_steward_wallet_handle |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pool refresh is not called here but pool handle is returned
it should be fixed
@@ -60,7 +75,8 @@ def testCatchupDelayedNodes(txnPoolNodeSet, nodeSetWithNodeAddedAfterSomeTxns, | |||
nodeX.stop() | |||
nodeY.stop() | |||
logger.debug("Sending requests") | |||
sendReqsToNodesAndVerifySuffReplies(looper, wallet, client, 50) | |||
sdk_send_random_and_check(looper, txnPoolNodeSet, sdk_pool_handle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pool refresh is not called before pool handle usage
fix it here and in all "add node tests" below
@@ -43,7 +43,7 @@ def pre_check(tconf, looper, txnPoolNodeSet, tdirWithClientPoolTxns, | |||
looper.add(client) | |||
looper.run(client.ensureConnectedToNodes()) | |||
for i in range(tconf.ProcessedBatchMapsToKeep - 1): | |||
sendReqsToNodesAndVerifySuffReplies(looper, wallet, client, 1) | |||
sendReqsToNodesAndVerifySuffReplies(looper, wallet, client, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you forget to change it?
…al, NodeSetWithNodeAddedAfterSomeTxns, nodeCreatedAfterSomeTxns, newNodeCaughtUp. Signed-off-by: ArtObr <[email protected]>
Test this please |
1 similar comment
Test this please |
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
|
||
logger.info("3. send more requests, " | ||
"so that the new node's state is outdated") | ||
sendReqsToNodesAndVerifySuffReplies(looper, wallet, client, 5) | ||
checkNodeDataForInequality(newNode, *txnPoolNodeSet[:-1]) | ||
sdk_send_random_and_check(looper, txnPoolNodeSet, sdk_pool_handle, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no pool refresh after node update
add pool refresh to the end of sdk_send_update_node func, i.e. inside the func
tdir, tdirWithClientPoolTxns, tconf, nodeClass=testNodeClass, | ||
new_steward_name = randomString() | ||
new_node_name = "Epsilon" | ||
new_steward_wallet_handle, new_node = sdk_add_new_steward_and_node( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add pool refresh after the call
from plenum.test.pool_transactions.helper import \ | ||
disconnect_node_and_ensure_disconnected | ||
from plenum.test.test_node import ensureElectionsDone, getRequiredInstances | ||
from plenum.test.view_change.helper import start_stopped_node | ||
|
||
TestRunningTimeLimitSec = 200 | ||
TestRunningTimeLimitSec = 400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add TODO with something like "restore back after sdk will have api call to change its timeout"
@@ -86,9 +92,10 @@ def test_plugin_dynamic_validation(txn_pool_node_set_post_creation, looper, stew | |||
successful_op(looper, op, sdk_wallet_steward, sdk_pool_handle) | |||
|
|||
|
|||
# TODO: probably delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you want to delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It uses sdk requests sends and in the same time take value of defaultId from stewardWallet. So i thought that this is check related to the old client things. Also, it have only 2 usage as a fixture.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to rewrite it and remove the comment
@@ -45,7 +44,7 @@ def testStewardSuspendsNode(looper, txnPoolNodeSet, | |||
looper.run(eventually(checkNodeNotInNodeReg, client, newNode.name)) | |||
|
|||
# Check a client can send request and receive replies | |||
req = sendRandomRequest(newStewardWallet, newSteward) | |||
# req = sendRandomRequest(newStewardWallet, newSteward) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did comment this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cause i think that this test will never be unskip (: (it was skipped 02.17)
plenum/test/test_dirty_read.py
Outdated
@@ -1,58 +0,0 @@ | |||
from plenum.common.types import f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not delete this test and file
Rewrite it
client, | ||
numRequests, | ||
fVal) | ||
# sendReqsToNodesAndVerifySuffReplies(txnPoolNodesLooper, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove comments
@@ -41,19 +40,14 @@ def catchuped(node): | |||
assert node.mode == Mode.participating | |||
|
|||
|
|||
def add_new_node(looper, nodes, steward, steward_wallet, | |||
def add_new_node(looper, nodes, sdk_pool_handle, sdk_wallet_steward, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add pool refresh to this func
Signed-off-by: ArtObr <[email protected]>
@@ -86,9 +92,10 @@ def test_plugin_dynamic_validation(txn_pool_node_set_post_creation, looper, stew | |||
successful_op(looper, op, sdk_wallet_steward, sdk_pool_handle) | |||
|
|||
|
|||
# TODO: probably delete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to rewrite it and remove the comment
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
Signed-off-by: ArtObr <[email protected]>
…dy-plenum into indy-sdk-integration/INDY-1209
…per functions (hyperledger#579) * Initial test integration Signed-off-by: ArtObr <[email protected]> * Two more files done Signed-off-by: ArtObr <[email protected]> * new test Signed-off-by: ArtObr <[email protected]> * 4 more folders done Signed-off-by: ArtObr <[email protected]> * two more files Signed-off-by: ArtObr <[email protected]> * some changes Signed-off-by: ArtObr <[email protected]> * More tests integrated. Problems: validator functions of client in test_state_proof; problem with wrong bls keys Signed-off-by: ArtObr <[email protected]> * Initial commit Signed-off-by: ArtObr <[email protected]> * Script fix. bls validation fix Signed-off-by: ArtObr <[email protected]> * more changes Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * Fix for bls validation tests. Not done: update_incorrect test and state_proof test Signed-off-by: ArtObr <[email protected]> * Only state_proof test left Signed-off-by: ArtObr <[email protected]> * Tests integration done Signed-off-by: ArtObr <[email protected]> * Deletion of Client1Connected. More test fix Signed-off-by: ArtObr <[email protected]> * Import deletion. flake8 error fix. Signed-off-by: ArtObr <[email protected]> * More changes to txnPoolNodeSet Signed-off-by: ArtObr <[email protected]> * Changes in tests Signed-off-by: ArtObr <[email protected]> * Remove pf TestNodeSet. Change of helper methods. Part 1. Signed-off-by: ArtObr <[email protected]> * Remove TestNodeSet from helper. part 2 Signed-off-by: ArtObr <[email protected]> * More tests integrated Signed-off-by: ArtObr <[email protected]> * Functions fixes. Signed-off-by: ArtObr <[email protected]> * Fix for genesis txns Signed-off-by: ArtObr <[email protected]> * More tests integrated Signed-off-by: ArtObr <[email protected]> * primary_selection dependency fix Signed-off-by: ArtObr <[email protected]> * Fixture fix for view_change Signed-off-by: ArtObr <[email protected]> * View change test fix Signed-off-by: ArtObr <[email protected]> * Skips for merkle proof tests Signed-off-by: ArtObr <[email protected]> * Skips for merkle proof tests Signed-off-by: ArtObr <[email protected]> * Remove sendRandomRequest of old client. Part 1. Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequest. Part 2. Signed-off-by: ArtObr <[email protected]> * Little error fix Signed-off-by: ArtObr <[email protected]> * waitReqNackFromPoolWithReason function deletion Signed-off-by: ArtObr <[email protected]> * waitRejectFromPoolWithReason function deletion Signed-off-by: ArtObr <[email protected]> * checkReqNack function deletion Signed-off-by: ArtObr <[email protected]> * Two more fucntions deletion Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 1. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 2. send_reqs_to_nodes_and_verify_all_replies deleted. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 3. Signed-off-by: ArtObr <[email protected]> * Little fix Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequest. Part 4. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 5. Deleted: ensure_pool_functional, NodeSetWithNodeAddedAfterSomeTxns, nodeCreatedAfterSomeTxns, newNodeCaughtUp. Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * little fix for test passing Signed-off-by: ArtObr <[email protected]> * little fix for test passing Signed-off-by: ArtObr <[email protected]> * Review change Signed-off-by: ArtObr <[email protected]>
…per functions (hyperledger#579) * Initial test integration Signed-off-by: ArtObr <[email protected]> * Two more files done Signed-off-by: ArtObr <[email protected]> * new test Signed-off-by: ArtObr <[email protected]> * 4 more folders done Signed-off-by: ArtObr <[email protected]> * two more files Signed-off-by: ArtObr <[email protected]> * some changes Signed-off-by: ArtObr <[email protected]> * More tests integrated. Problems: validator functions of client in test_state_proof; problem with wrong bls keys Signed-off-by: ArtObr <[email protected]> * Initial commit Signed-off-by: ArtObr <[email protected]> * Script fix. bls validation fix Signed-off-by: ArtObr <[email protected]> * more changes Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * Fix for bls validation tests. Not done: update_incorrect test and state_proof test Signed-off-by: ArtObr <[email protected]> * Only state_proof test left Signed-off-by: ArtObr <[email protected]> * Tests integration done Signed-off-by: ArtObr <[email protected]> * Deletion of Client1Connected. More test fix Signed-off-by: ArtObr <[email protected]> * Import deletion. flake8 error fix. Signed-off-by: ArtObr <[email protected]> * More changes to txnPoolNodeSet Signed-off-by: ArtObr <[email protected]> * Changes in tests Signed-off-by: ArtObr <[email protected]> * Remove pf TestNodeSet. Change of helper methods. Part 1. Signed-off-by: ArtObr <[email protected]> * Remove TestNodeSet from helper. part 2 Signed-off-by: ArtObr <[email protected]> * More tests integrated Signed-off-by: ArtObr <[email protected]> * Functions fixes. Signed-off-by: ArtObr <[email protected]> * Fix for genesis txns Signed-off-by: ArtObr <[email protected]> * More tests integrated Signed-off-by: ArtObr <[email protected]> * primary_selection dependency fix Signed-off-by: ArtObr <[email protected]> * Fixture fix for view_change Signed-off-by: ArtObr <[email protected]> * View change test fix Signed-off-by: ArtObr <[email protected]> * Skips for merkle proof tests Signed-off-by: ArtObr <[email protected]> * Skips for merkle proof tests Signed-off-by: ArtObr <[email protected]> * Remove sendRandomRequest of old client. Part 1. Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequest. Part 2. Signed-off-by: ArtObr <[email protected]> * Little error fix Signed-off-by: ArtObr <[email protected]> * waitReqNackFromPoolWithReason function deletion Signed-off-by: ArtObr <[email protected]> * waitRejectFromPoolWithReason function deletion Signed-off-by: ArtObr <[email protected]> * checkReqNack function deletion Signed-off-by: ArtObr <[email protected]> * Two more fucntions deletion Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 1. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 2. send_reqs_to_nodes_and_verify_all_replies deleted. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 3. Signed-off-by: ArtObr <[email protected]> * Little fix Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequest. Part 4. Signed-off-by: ArtObr <[email protected]> * Deletion of sendRandomRequests. Part 5. Deleted: ensure_pool_functional, NodeSetWithNodeAddedAfterSomeTxns, nodeCreatedAfterSomeTxns, newNodeCaughtUp. Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * little fix Signed-off-by: ArtObr <[email protected]> * Review changes Signed-off-by: ArtObr <[email protected]> * little fix for test passing Signed-off-by: ArtObr <[email protected]> * little fix for test passing Signed-off-by: ArtObr <[email protected]> * Review change Signed-off-by: ArtObr <[email protected]>
No description provided.