7311: spotless

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
pull/7628/head
Matilda Clerke 2 months ago
parent 608feceff4
commit 2d0780055b
  1. 2
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java
  2. 4
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/DefaultPeerSelectorTest.java

@ -134,7 +134,7 @@ public class PeerTaskExecutor {
private boolean sleepBetweenRetries() { private boolean sleepBetweenRetries() {
try { try {
//sleep for 1 second to match implemented wait between retries in AbstractRetryingPeerTask // sleep for 1 second to match implemented wait between retries in AbstractRetryingPeerTask
Thread.sleep(1000); Thread.sleep(1000);
return true; return true;
} catch (InterruptedException e) { } catch (InterruptedException e) {

@ -72,7 +72,9 @@ public class DefaultPeerSelectorTest {
createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 4); createTestPeer(Set.of(Capability.create("capability1", 1)), "protocol2", 4);
peerSelector.addPeer(protocol2With4ReputationPeer); peerSelector.addPeer(protocol2With4ReputationPeer);
Assertions.assertThrows(NoAvailablePeerException.class, () -> peerSelector.getPeer((p) -> p.getProtocolName().equals("fake protocol"))); Assertions.assertThrows(
NoAvailablePeerException.class,
() -> peerSelector.getPeer((p) -> p.getProtocolName().equals("fake protocol")));
} }
private EthPeer createTestPeer( private EthPeer createTestPeer(

Loading…
Cancel
Save