diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTest.java index 3eb746b7ae..7c8c78c4b3 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTest.java @@ -46,6 +46,9 @@ public class NodeSmartContractPermissioningAcceptanceTest permissionedNode.execute(allowNode(permissionedNode)); permissionedNode.verify(nodeIsAllowed(permissionedNode)); + + permissionedNode.verify(admin.addPeer(bootnode)); + permissionedNode.verify(admin.addPeer(allowedNode)); } @Test @@ -58,38 +61,18 @@ public class NodeSmartContractPermissioningAcceptanceTest @Test public void permissionedNodeShouldDisconnectFromNodeNotPermittedAnymore() { - permissionedNode.verify(admin.addPeer(bootnode)); - permissionedNode.verify(admin.addPeer(allowedNode)); - permissionedNode.verify(net.awaitPeerCount(2)); - permissionedNode.execute(forbidNode(allowedNode)); permissionedNode.verify(connectionIsForbidden(permissionedNode, allowedNode)); permissionedNode.verify(net.awaitPeerCount(1)); } - @Test - public void permissionedNodeShouldConnectToNewlyPermittedNode() { - permissionedNode.verify(admin.addPeer(bootnode)); - permissionedNode.verify(admin.addPeer(allowedNode)); - permissionedNode.verify(net.awaitPeerCount(2)); - - permissionedNode.execute(allowNode(forbiddenNode)); - permissionedNode.verify(connectionIsAllowed(permissionedNode, forbiddenNode)); - permissionedNode.verify(admin.addPeer(forbiddenNode)); - - permissionedNode.verify(net.awaitPeerCount(3)); - } - @Test public void permissioningUpdatesPropagateThroughNetwork() { - permissionedNode.verify(admin.addPeer(bootnode)); - permissionedNode.verify(admin.addPeer(allowedNode)); - permissionedNode.verify(net.awaitPeerCount(2)); - - // permissioning changes in peer should propagate to permissioned node + // connection to newly permitted node is allowed allowedNode.execute(allowNode(forbiddenNode)); allowedNode.verify(connectionIsAllowed(permissionedNode, forbiddenNode)); + // permissioning changes in peer should propagate to permissioned node permissionedNode.verify(connectionIsAllowed(permissionedNode, forbiddenNode)); permissionedNode.verify(admin.addPeer(forbiddenNode));