Search in sources :

Example 46 with Executor

use of org.apache.http.client.fluent.Executor in project redisson by redisson.

the class RedissonSessionManagerTest method testRecreate.

@Test
public void testRecreate() throws Exception {
    // start the server at http://localhost:8080/myapp
    TomcatServer server = new TomcatServer("myapp", 8080, "src/test/");
    server.start();
    Executor executor = Executor.newInstance();
    write(executor, "test", "1");
    recreate(executor, "test", "2");
    read(executor, "test", "2");
    Executor.closeIdleConnections();
    server.stop();
}
Also used : Executor(org.apache.http.client.fluent.Executor) Test(org.junit.jupiter.api.Test)

Aggregations

Executor (org.apache.http.client.fluent.Executor)46 Test (org.junit.Test)26 Request (org.apache.http.client.fluent.Request)12 BasicCookieStore (org.apache.http.impl.client.BasicCookieStore)11 HttpResponse (org.apache.http.HttpResponse)6 Response (org.apache.http.client.fluent.Response)6 URI (java.net.URI)5 Cookie (org.apache.http.cookie.Cookie)5 Test (org.junit.jupiter.api.Test)5 JsonObject (com.google.gson.JsonObject)4 InputStream (java.io.InputStream)4 DistributionTransportSecret (org.apache.sling.distribution.transport.DistributionTransportSecret)4 StreamsConnection (com.ibm.streamsx.rest.StreamsConnection)3 HashMap (java.util.HashMap)3 DistributionRequest (org.apache.sling.distribution.DistributionRequest)3 JsonParser (com.google.gson.JsonParser)2 Instance (com.ibm.streamsx.rest.Instance)2 ICP4DAuthenticator (com.ibm.streamsx.rest.internal.ICP4DAuthenticator)2 StandaloneAuthenticator (com.ibm.streamsx.rest.internal.StandaloneAuthenticator)2 ByteArrayInputStream (java.io.ByteArrayInputStream)2