You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/05/05 08:57:37 UTC
[httpcomponents-client] branch master updated: Remove unused code
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git
The following commit(s) were added to refs/heads/master by this push:
new daac18619 Remove unused code
daac18619 is described below
commit daac18619a5fea8a68a0eff17037a46d364a8d43
Author: niranjan ghule <ni...@gmail.com>
AuthorDate: Wed May 4 22:55:56 2022 +0530
Remove unused code
---
.../http/impl/classic/TestMainClientExec.java | 23 +---------------------
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
index 0755c2add..ef374748b 100644
--- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
+++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestMainClientExec.java
@@ -55,7 +55,6 @@ import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
-import org.mockito.stubbing.Answer;
@SuppressWarnings({"boxing","static-access"}) // test code
public class TestMainClientExec {
@@ -181,7 +180,7 @@ public class TestMainClientExec {
.setStream(new ByteArrayInputStream(new byte[]{}))
.build());
- final ConnectionState connectionState = new ConnectionState();
+
Mockito.when(execRuntime.execute(
Mockito.anyString(),
Mockito.same(request),
@@ -245,7 +244,6 @@ public class TestMainClientExec {
.setStream(new ByteArrayInputStream(new byte[]{}))
.build());
- final ConnectionState connectionState = new ConnectionState();
Mockito.when(execRuntime.execute(
Mockito.anyString(),
Mockito.same(request),
@@ -337,23 +335,4 @@ public class TestMainClientExec {
Mockito.verify(execRuntime).discardEndpoint();
}
- static class ConnectionState {
-
- private boolean connected;
-
- public Answer<?> connectAnswer() {
-
- return invocationOnMock -> {
- connected = true;
- return null;
- };
- }
-
- public Answer<Boolean> isConnectedAnswer() {
-
- return invocationOnMock -> connected;
-
- }
- }
-
}