Last active
November 17, 2017 08:21
-
-
Save mbjelac/84a9310a7c96ba6c1d802f5c2dddddc9 to your computer and use it in GitHub Desktop.
troubleshooting MockServerClient.reset 4 second lag
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.http.client.fluent.Request; | |
import org.junit.Test; | |
import org.mockserver.client.server.MockServerClient; | |
import java.io.IOException; | |
public class MockServerTroubleshootingTest { | |
private static final String HOST = "192.168.0.196"; | |
private static final int PORT = 1080; | |
@Test | |
public void reset_with_MockServerClient() { | |
new MockServerClient(HOST, PORT).reset(); | |
} | |
@Test | |
public void reset_with_apache() throws IOException { | |
Request.Put("http://" + HOST + ":" + PORT + "/reset") | |
.addHeader("Host", HOST + ":" + PORT) | |
.addHeader("Accept-Encoding", "gzip,deflate") | |
.addHeader("Connection", "keep-alive") | |
.execute(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment