This repository has been archived by the owner on Sep 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 130
AT DSL - Removing WaitCondition, consistently applying Condition instead #1513
Merged
CjHare
merged 8 commits into
PegaSysEng:master
from
CjHare:at-dsl-removing-waituntil-from-node
Jun 3, 2019
Merged
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ce9996a
Remove WaitCondition
CjHare 5dffa95
Merge branch 'master' of github.com:PegaSysEng/pantheon into at-dsl-r…
CjHare 8d4ecfd
AT DSL Blockchain tidy up
CjHare 746d7ce
Merging upstream
CjHare 017f81c
Fixing upstream merge
CjHare da5a631
Merge branch 'master' of github.com:PegaSysEng/pantheon into at-dsl-r…
CjHare 5e4d1c2
PR comment
CjHare 3bf8ac7
Renaming method
CjHare File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,9 +13,9 @@ | |
package tech.pegasys.pantheon.tests.acceptance.clique; | ||
|
||
import tech.pegasys.pantheon.tests.acceptance.dsl.AcceptanceTestBase; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.Condition; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.condition.clique.ExpectNonceVote.CLIQUE_NONCE_VOTE; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.node.PantheonNode; | ||
import tech.pegasys.pantheon.tests.acceptance.dsl.waitcondition.WaitCondition; | ||
|
||
import java.io.IOException; | ||
|
||
|
@@ -35,10 +35,10 @@ public void shouldAddValidators() throws IOException { | |
cluster.start(minerNode1, minerNode2, minerNode3); | ||
|
||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2)); | ||
final WaitCondition cliqueValidatorsChanged = wait.cliqueValidatorsChanged(minerNode1); | ||
final Condition cliqueValidatorsChanged = clique.awaitSignerSetChange(minerNode1); | ||
minerNode1.execute(cliqueTransactions.createAddProposal(minerNode3)); | ||
minerNode2.execute(cliqueTransactions.createAddProposal(minerNode3)); | ||
cluster.waitUntil(cliqueValidatorsChanged); | ||
cluster.verify(cliqueValidatorsChanged); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This line should be removed - if we're ditching the "waiting" concept, then no need to ensure miner1 has changed - just ensure all the cluster have in the next line (and thus line 38 can probably go too). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2, minerNode3)); | ||
} | ||
|
||
|
@@ -54,10 +54,10 @@ public void shouldRemoveValidators() throws IOException { | |
cluster.start(minerNode1, minerNode2, minerNode3); | ||
|
||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2, minerNode3)); | ||
final WaitCondition cliqueValidatorsChanged = wait.cliqueValidatorsChanged(minerNode1); | ||
final Condition cliqueValidatorsChanged = clique.awaitSignerSetChange(minerNode1); | ||
minerNode1.execute(cliqueTransactions.createRemoveProposal(minerNode3)); | ||
minerNode2.execute(cliqueTransactions.createRemoveProposal(minerNode3)); | ||
cluster.waitUntil(cliqueValidatorsChanged); | ||
cluster.verify(cliqueValidatorsChanged); | ||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2)); | ||
} | ||
|
||
|
@@ -74,7 +74,7 @@ public void shouldNotAddValidatorWhenInsufficientVotes() throws IOException { | |
|
||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2)); | ||
minerNode1.execute(cliqueTransactions.createAddProposal(minerNode3)); | ||
minerNode1.waitUntil(wait.chainHeadHasProgressedByAtLeast(minerNode1, 1)); | ||
minerNode1.verify(blockchain.minimumHeightProgression(minerNode1, 1)); | ||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2)); | ||
} | ||
|
||
|
@@ -87,7 +87,7 @@ public void shouldNotRemoveValidatorWhenInsufficientVotes() throws IOException { | |
|
||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2, minerNode3)); | ||
minerNode1.execute(cliqueTransactions.createRemoveProposal(minerNode3)); | ||
minerNode1.waitUntil(wait.chainHeadHasProgressedByAtLeast(minerNode1, 1)); | ||
minerNode1.verify(blockchain.minimumHeightProgression(minerNode1, 1)); | ||
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2, minerNode3)); | ||
} | ||
|
||
|
@@ -103,12 +103,12 @@ public void shouldIncludeVoteInBlockHeader() throws IOException { | |
cluster.start(minerNode1, minerNode2, minerNode3); | ||
|
||
minerNode1.execute(cliqueTransactions.createAddProposal(minerNode3)); | ||
minerNode1.waitUntil(wait.chainHeadHasProgressedByAtLeast(minerNode1, 1)); | ||
minerNode1.verify(blockchain.minimumHeightProgression(minerNode1, 1)); | ||
minerNode1.verify(blockchain.beneficiaryEquals(minerNode3)); | ||
minerNode1.verify(clique.nonceVoteEquals(CLIQUE_NONCE_VOTE.AUTH)); | ||
|
||
minerNode1.execute(cliqueTransactions.createRemoveProposal(minerNode2)); | ||
minerNode1.waitUntil(wait.chainHeadHasProgressedByAtLeast(minerNode1, 1)); | ||
minerNode1.verify(blockchain.minimumHeightProgression(minerNode1, 1)); | ||
minerNode1.verify(blockchain.beneficiaryEquals(minerNode2)); | ||
minerNode1.verify(clique.nonceVoteEquals(CLIQUE_NONCE_VOTE.DROP)); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
...src/test/java/tech/pegasys/pantheon/tests/acceptance/dsl/waitcondition/WaitCondition.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
progression sounds a bit odd here. Is there a consistent phrasing or tense used or meant to be used for the dsl?
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.
suggested alternative?
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.
blockchain.reachesHeight()
?