Fix flaky test (#6917)

* check for chain height not syncing status

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/6922/head
Sally MacFarlane 8 months ago committed by GitHub
parent 66176c0619
commit 4c21d63413
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTest.java
  2. 8
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTestBase.java

@ -101,10 +101,12 @@ public class NodeSmartContractPermissioningV2AcceptanceTest
}
private void verifyAllNodesHaveFinishedSyncing() {
allowedNode.verify(eth.syncingStatus(false));
bootnode.verify(eth.syncingStatus(false));
permissionedNode.verify(eth.syncingStatus(false));
forbiddenNode.verify(eth.syncingStatus(false));
// verify the miner (permissionedNode) started producing blocks and other nodes are syncing
// from it
waitForBlockHeight(permissionedNode, 1);
final var minerChainHead = permissionedNode.execute(ethTransactions.block());
bootnode.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue()));
allowedNode.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue()));
}
@Test

@ -93,14 +93,6 @@ class NodeSmartContractPermissioningV2AcceptanceTestBase extends AcceptanceTestB
}
}
protected Node miner(final String name) {
try {
return besu.createCustomGenesisNode(name, GENESIS_FILE, false, true);
} catch (IOException e) {
throw new RuntimeException("Error creating node", e);
}
}
@Override
public void tearDownAcceptanceTestBase() {
permissionedCluster.stop();

Loading…
Cancel
Save