|
|
@ -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( |
|
|
|