From 3c12d3d8c33641487265f57fecfb05ec840c3f4b Mon Sep 17 00:00:00 2001 From: Matilda Clerke Date: Thu, 10 Oct 2024 16:18:58 +1100 Subject: [PATCH] 7311: Fix incorrect name on isPartialSuccessTest Signed-off-by: Matilda Clerke --- .../besu/ethereum/eth/manager/peertask/PeerTask.java | 2 +- .../eth/manager/peertask/PeerTaskExecutor.java | 2 +- .../eth/manager/peertask/PeerTaskExecutorTest.java | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTask.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTask.java index 57976ac2e9..40b995503f 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTask.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTask.java @@ -79,5 +79,5 @@ public interface PeerTask { * * @return true if the supplied result is considered a partial success */ - boolean isPartialSuccessTest(T result); + boolean isPartialSuccess(T result); } diff --git a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java index 5d1883c7d8..9b06297746 100644 --- a/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java +++ b/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutor.java @@ -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); diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutorTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutorTest.java index a4e78056e1..853210e685 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutorTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/peertask/PeerTaskExecutorTest.java @@ -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 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 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 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 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 result = peerTaskExecutor.execute(peerTask);