7311: Fix incorrect name on isPartialSuccessTest

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
pull/7628/head
Matilda Clerke 2 months ago
parent b06f38b260
commit 3c12d3d8c3
  1. 2
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTask.java
  2. 2
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java
  3. 10
      ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutorTest.java

@ -79,5 +79,5 @@ public interface PeerTask<T> {
*
* @return true if the supplied result is considered a partial success
*/
boolean isPartialSuccessTest(T result);
boolean isPartialSuccess(T result);
}

@ -113,7 +113,7 @@ public class PeerTaskExecutor {
result = peerTask.parseResponse(responseMessageData);
}
if (peerTask.isPartialSuccessTest(result)) {
if (peerTask.isPartialSuccess(result)) {
executorResult =
new PeerTaskExecutorResult<>(
Optional.ofNullable(result), PeerTaskExecutorResponseCode.PARTIAL_SUCCESS);

@ -73,7 +73,7 @@ public class PeerTaskExecutorTest {
Mockito.when(requestSender.sendRequest(subprotocol, requestMessageData, ethPeer))
.thenReturn(responseMessageData);
Mockito.when(peerTask.parseResponse(responseMessageData)).thenReturn(responseObject);
Mockito.when(peerTask.isPartialSuccessTest(responseObject)).thenReturn(false);
Mockito.when(peerTask.isPartialSuccess(responseObject)).thenReturn(false);
PeerTaskExecutorResult<Object> result = peerTaskExecutor.executeAgainstPeer(peerTask, ethPeer);
@ -102,7 +102,7 @@ public class PeerTaskExecutorTest {
Mockito.when(requestSender.sendRequest(subprotocol, requestMessageData, ethPeer))
.thenReturn(responseMessageData);
Mockito.when(peerTask.parseResponse(responseMessageData)).thenReturn(responseObject);
Mockito.when(peerTask.isPartialSuccessTest(responseObject)).thenReturn(true);
Mockito.when(peerTask.isPartialSuccess(responseObject)).thenReturn(true);
PeerTaskExecutorResult<Object> result = peerTaskExecutor.executeAgainstPeer(peerTask, ethPeer);
@ -132,7 +132,7 @@ public class PeerTaskExecutorTest {
.thenReturn(responseMessageData);
Mockito.when(requestMessageData.getCode()).thenReturn(requestMessageDataCode);
Mockito.when(peerTask.parseResponse(responseMessageData)).thenReturn(responseObject);
Mockito.when(peerTask.isPartialSuccessTest(responseObject)).thenReturn(false);
Mockito.when(peerTask.isPartialSuccess(responseObject)).thenReturn(false);
PeerTaskExecutorResult<Object> result = peerTaskExecutor.executeAgainstPeer(peerTask, ethPeer);
@ -238,7 +238,7 @@ public class PeerTaskExecutorTest {
Mockito.when(requestSender.sendRequest(subprotocol, requestMessageData, ethPeer))
.thenReturn(responseMessageData);
Mockito.when(peerTask.parseResponse(responseMessageData)).thenReturn(responseObject);
Mockito.when(peerTask.isPartialSuccessTest(responseObject)).thenReturn(false);
Mockito.when(peerTask.isPartialSuccess(responseObject)).thenReturn(false);
PeerTaskExecutorResult<Object> result = peerTaskExecutor.executeAgainstPeer(peerTask, ethPeer);
@ -276,7 +276,7 @@ public class PeerTaskExecutorTest {
Mockito.when(requestSender.sendRequest(subprotocol, requestMessageData, peer2))
.thenReturn(responseMessageData);
Mockito.when(peerTask.parseResponse(responseMessageData)).thenReturn(responseObject);
Mockito.when(peerTask.isPartialSuccessTest(responseObject)).thenReturn(false);
Mockito.when(peerTask.isPartialSuccess(responseObject)).thenReturn(false);
PeerTaskExecutorResult<Object> result = peerTaskExecutor.execute(peerTask);

Loading…
Cancel
Save