Skip to content

add unit test #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
chu thich cho bien myURL
sưa loi magic number 50 voi chu thich bien ro rang
  • Loading branch information
kennguyengk committed Aug 22, 2022
commit 8a339473a2eb6804c5f94e561b8e8a71c93fa6b3
9 changes: 7 additions & 2 deletions src/main/java/com/rampatra/misc/BotTesting.java
Original file line number Diff line number Diff line change
@@ -19,11 +19,16 @@

public class BotTesting {
public static void main(String args[]) throws MalformedURLException {
final URL myURL = new URL("http://localhost:8080/ifb.html");

// URL use to track
String testUrl = "http://localhost:8080/ifb.html";
final URL myURL = new URL(testUrl);
ExecutorService executorService = Executors.newFixedThreadPool(20);
Long start = System.currentTimeMillis();

for (int i = 0; i <= 50; i++) {
// times to run the request
int requestTimes = 50;
for (int i = 0; i <= requestTimes; i++) {
executorService.execute(new Runnable() {

@Override