extra check for syncing (#6771)

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/6788/head
Sally MacFarlane 8 months ago committed by GitHub
parent bee0e5e807
commit 6fcac7bd45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 14
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTest.java

@ -47,10 +47,7 @@ public class NodeSmartContractPermissioningV2AcceptanceTest
permissionedNode.execute(allowNode(permissionedNode));
permissionedNode.verify(connectionIsAllowed(permissionedNode));
allowedNode.verify(eth.syncingStatus(false));
bootnode.verify(eth.syncingStatus(false));
permissionedNode.verify(eth.syncingStatus(false));
forbiddenNode.verify(eth.syncingStatus(false));
verifyAllNodesHaveFinishedSyncing();
}
@Test
@ -92,6 +89,8 @@ public class NodeSmartContractPermissioningV2AcceptanceTest
permissionedNode.verify(admin.addPeer(allowedNode));
permissionedNode.verify(net.awaitPeerCount(2));
verifyAllNodesHaveFinishedSyncing();
// permissioning changes in peer should propagate to permissioned node
allowedNode.execute(allowNode(forbiddenNode));
allowedNode.verify(connectionIsAllowed(forbiddenNode));
@ -101,6 +100,13 @@ public class NodeSmartContractPermissioningV2AcceptanceTest
permissionedNode.verify(net.awaitPeerCount(3));
}
private void verifyAllNodesHaveFinishedSyncing() {
allowedNode.verify(eth.syncingStatus(false));
bootnode.verify(eth.syncingStatus(false));
permissionedNode.verify(eth.syncingStatus(false));
forbiddenNode.verify(eth.syncingStatus(false));
}
@Test
public void onchainPermissioningAllowlistShouldPersistAcrossRestarts() {
permissionedCluster.stop();

Loading…
Cancel
Save