Skip to content
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-1113: Node disconnection, view change tests #551

Merged
merged 38 commits into from
Mar 5, 2018

Conversation

spivachuk
Copy link
Contributor

@spivachuk spivachuk commented Feb 26, 2018

  • Corrected the procedures of node disconnection and reconnection in tests.
  • Removed a workaround patch which had become unnecessary from start_stopped_node function in tests.
  • Corrected existing tests according to the fixes specified above.
  • Added a test verifying that a view change is restarted each time when the previous one is timed out.
  • Added a test verifying that a disconnected node with a lagged view accepts the current view from the other nodes on re-connection.
  • Fixed the cause of a potential error with a not retrieved exception of a future in sdk_get_replies function.
  • Corrected test helpers for Indy SDK.
  • Added a workaround to avoid hang-ups of test_6_nodes_pool_cannot_reach_quorum_with_2_disconnected.

- Corrected the procedures of node disconnection and reconnection in tests.
- Removed a workaround patch which had become unnecessary from start_stopped_node function in tests.
- Corrected existing tests according to the fixes specified above.
- Added a test verifying that a view change is restarted each time when the previous one is timed out.
- Added a test verifying that a disconnected node with a lagged view accepts the current view from the other nodes on re-connection.

Signed-off-by: Nikita Spivachuk <[email protected]>
…e-disconnection-fix

Signed-off-by: Nikita Spivachuk <[email protected]>

# Conflicts:
#	plenum/test/node_request/test_quorum_disconnected.py
#	plenum/test/pool_transactions/helper.py
#	plenum/test/test_stack.py
@ghost
Copy link

ghost commented Feb 26, 2018

Could one of the committers please verify this patch?

@spivachuk
Copy link
Contributor Author

test this please

vNo, = viewNos
if expectedViewNo is not None:
assert vNo >= expectedViewNo, ','.join(['{} -> Ratio: {}'.format(
node.name, node.monitor.masterThroughputRatio()) for node in nodes])
assert vNo == expectedViewNo, 'Expected {}, but got {}'.format(expectedViewNo, vNo)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It must be >=, since there may be more than one view change.

@@ -540,7 +541,8 @@ def new_client(looper, poolTxnClientData, txnPoolNodeSet, client_tdir):
return client, wallet


def disconnectPoolNode(poolNodes: Iterable,
def disconnectPoolNode(looper: Looper,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need looper here?

- Returned back the not strict view number comparison in checkViewNoForNodes function in tests since the strict comparison may cause failures of some tests.
- Corrected parameter lists of some test helper functions.

Signed-off-by: Nikita Spivachuk <[email protected]>
- Fixed the cause of a potential error with a not retrieved exception of a future in sdk_get_replies function.
- Corrected test helpers for Indy SDK.

Signed-off-by: Nikita Spivachuk <[email protected]>
- Added a workaround to avoid hang-ups of test_6_nodes_pool_cannot_reach_quorum_with_2_disconnected.

Signed-off-by: Nikita Spivachuk <[email protected]>
Signed-off-by: Nikita Spivachuk <[email protected]>
@spivachuk
Copy link
Contributor Author

test this please

@ashcherbakov ashcherbakov merged commit f931893 into hyperledger:master Mar 5, 2018
lampkin-diet pushed a commit to lampkin-diet/indy-plenum that referenced this pull request Apr 9, 2018
* INDY-1113: Node disconnection, view change tests

- Corrected the procedures of node disconnection and reconnection in tests.
- Removed a workaround patch which had become unnecessary from start_stopped_node function in tests.
- Corrected existing tests according to the fixes specified above.
- Added a test verifying that a view change is restarted each time when the previous one is timed out.
- Added a test verifying that a disconnected node with a lagged view accepts the current view from the other nodes on re-connection.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Return not strict view no comparison

- Returned back the not strict view number comparison in checkViewNoForNodes function in tests since the strict comparison may cause failures of some tests.
- Corrected parameter lists of some test helper functions.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Fixed error with future

- Fixed the cause of a potential error with a not retrieved exception of a future in sdk_get_replies function.
- Corrected test helpers for Indy SDK.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Avoided test hang-ups

- Added a workaround to avoid hang-ups of test_6_nodes_pool_cannot_reach_quorum_with_2_disconnected.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Corrected a test

Signed-off-by: Nikita Spivachuk <[email protected]>
lampkin-diet pushed a commit to lampkin-diet/indy-plenum that referenced this pull request Apr 10, 2018
* INDY-1113: Node disconnection, view change tests

- Corrected the procedures of node disconnection and reconnection in tests.
- Removed a workaround patch which had become unnecessary from start_stopped_node function in tests.
- Corrected existing tests according to the fixes specified above.
- Added a test verifying that a view change is restarted each time when the previous one is timed out.
- Added a test verifying that a disconnected node with a lagged view accepts the current view from the other nodes on re-connection.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Return not strict view no comparison

- Returned back the not strict view number comparison in checkViewNoForNodes function in tests since the strict comparison may cause failures of some tests.
- Corrected parameter lists of some test helper functions.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Fixed error with future

- Fixed the cause of a potential error with a not retrieved exception of a future in sdk_get_replies function.
- Corrected test helpers for Indy SDK.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Avoided test hang-ups

- Added a workaround to avoid hang-ups of test_6_nodes_pool_cannot_reach_quorum_with_2_disconnected.

Signed-off-by: Nikita Spivachuk <[email protected]>

* INDY-1113: Corrected a test

Signed-off-by: Nikita Spivachuk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants