attempt to fix flaky test (#7008)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
pull/7033/head
Sally MacFarlane 7 months ago committed by GitHub
parent afea4e0057
commit 1ce3f8dec9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 12
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningOutOfSyncAcceptanceTest.java

@ -46,14 +46,18 @@ public class NodeSmartContractPermissioningOutOfSyncAcceptanceTest
final long blockchainHeight = 25L;
waitForBlockHeight(permissionedNodeA, blockchainHeight);
// Add Node B
// verify Node A is in sync with bootnode
final var minerChainHead = bootnode.execute(ethTransactions.block());
permissionedNodeA.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue()));
// check that connection is forbidden (before node b is permitted)
permissionedCluster.addNode(permissionedNodeB);
permissionedNodeB.verify(connectionIsForbidden(permissionedNodeA, permissionedNodeB));
// Permit Node B
permissionedNodeA.execute(allowNode(permissionedNodeB));
permissionedNodeA.verify(admin.addPeer(permissionedNodeB));
// check that connection is forbidden (while node b is syncing)
permissionedNodeB.verify(connectionIsForbidden(permissionedNodeA, permissionedNodeB));
// connection should be allowed after node B syncs
waitForBlockHeight(permissionedNodeB, blockchainHeight);
permissionedNodeB.verify(connectionIsAllowed(permissionedNodeA, permissionedNodeB));

Loading…
Cancel
Save