Skip to content

Instantly share code, notes, and snippets.

@lwahlmeier
Created May 17, 2018 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lwahlmeier/994961b499dfaa29ed5b38f21363dc75 to your computer and use it in GitHub Desktop.
Save lwahlmeier/994961b499dfaa29ed5b38f21363dc75 to your computer and use it in GitHub Desktop.
@Test
public void test111() throws InterruptedException, ExecutionException {
HTTPClient client = new HTTPClient(1, 1000000,SEI);
List<ListenableFuture<HTTPResponseData>> lf = new ArrayList<>();
for(int i=0; i<1000; i++) {
ListenableFuture<HTTPResponseData> hl = client.requestAsync(new HTTPRequestBuilder().setPath("/index.html").setHost("localhost").setPort(80).buildClientHTTPRequest());
lf.add(hl);
}
for(ListenableFuture<HTTPResponseData> hl: lf) {
System.out.println(hl.get());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment