Skip to content

Commit 252e7bf

Browse files
committed
Remove test code.
1 parent 3848d27 commit 252e7bf

File tree

1 file changed

+0
-45
lines changed

1 file changed

+0
-45
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -629,51 +629,6 @@ public static interface Cleanup {
629629

630630
}
631631

632-
633-
// ========================================================================
634-
635-
public static void main(String[] args) {
636-
AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder()
637-
.setMaximumConnectionsTotal(-1)
638-
.setMaximumConnectionsPerHost(4500)
639-
.setCompressionEnabled(false)
640-
.setAllowPoolingConnection(true /* keep-alive connection */)
641-
// .setAllowPoolingConnection(false /* no keep-alive connection */)
642-
.setConnectionTimeoutInMs(9000).setRequestTimeoutInMs(9000)
643-
.setIdleConnectionInPoolTimeoutInMs(3000).build();
644-
645-
AsyncHttpClient client =
646-
new AsyncHttpClient(new GrizzlyAsyncHttpProvider(config), config);
647-
648-
final int warmupRequests = 100000;
649-
final String testUrl = "http://localhost:8080";
650-
List<Future<Response>> futures =
651-
new ArrayList<Future<Response>>(warmupRequests);
652-
for (int i = 0; i < warmupRequests; i++) {
653-
try {
654-
futures.add(client.prepareGet(testUrl).addHeader("Req", Integer.toString(i)).execute());
655-
} catch (IOException e) {
656-
System.err.println("Failed to execute get at iteration #" + i);
657-
}
658-
}
659-
int counter = 0;
660-
for (Future<Response> future : futures) {
661-
counter++;
662-
try {
663-
future.get();
664-
System.out.println(counter + " complete");
665-
} catch (Exception e) {
666-
System.err.println("Failed to execute get at iteration #" + counter);
667-
e.printStackTrace();
668-
client.close();
669-
System.exit(1);
670-
}
671-
}
672-
673-
System.out.println("Test complete...");
674-
client.close();
675-
}
676-
677632
}
678633

679634

0 commit comments

Comments
 (0)