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-1304: Added tests that show problems with current view change [test #3] #701

Merged

Conversation

Toktar
Copy link
Contributor

@Toktar Toktar commented May 24, 2018

Tests that show problems with current view change.
#3

Test case:

  • disable normal view change to make tests deterministic
  • delay commits for all nodes except node X
  • send request
  • check ordered transaction in node X
  • start view_change
  • check end of view change for all nodes
  • switch off commits' delay
  • get reply (means that request was ordered in all nodes)
  • repeat

Expected result with correct view change: transactions should be ordered normally
Expected result with current view change: node X can't finish second transaction

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…ficate

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…ficate.py

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
…t_prepared_certificate.py

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
Changes:
- added node with advancing node. View change start in ordering and one node break due to advance.

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
sdk_wallet_client)


def delay_commits_for_all_except_one_node(nodes, nodes_without_one_stashers,
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's better to call the method do_view_change_with_delayed_commits_on_all_but_one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

…ut_one name

Signed-off-by: toktar <renata.toktar@dsr-corporation.com>
@Toktar
Copy link
Contributor Author

Toktar commented May 24, 2018

test this please

2 similar comments
@Toktar
Copy link
Contributor Author

Toktar commented May 24, 2018

test this please

@Toktar
Copy link
Contributor Author

Toktar commented May 24, 2018

test this please

nodes_stashers = [n.nodeIbStasher for n in txnPoolNodeSet
if n != txnPoolNodeSet[-1]]
for _ in range(2):
do_view_change_with_delayed_commits_on_all_but_one(txnPoolNodeSet,
Copy link
Contributor

Choose a reason for hiding this comment

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

What assertion do we check here to fail? Is it that we can not send new requests anymore (consensus is lost)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We check that 2 random requests will execute successful and we will receive reply. Now this test has assertion error in the last ordered() because except_node can't order new transaction.

@ashcherbakov ashcherbakov merged commit 8d3340f into hyperledger:master May 25, 2018
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.

None yet

2 participants