https://issues.apache.org/bugzilla/show_bug.cgi?id=55976

--- Comment #6 from Ognjen Blagojevic <ognjen.d.blagoje...@gmail.com> ---
Created attachment 31184
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31184&action=edit
Java test class

Here is Java class used for testing.

You should call it with one argument - starting URL (e.g.
"http://localhost:8080/";)

At the first phase, it crawls all pages starting from the root. During the
crawl, Java stack traces for 401s and 404s will be printed on the console, and
may be ignored.

At the second phase, it will repeatedly read all collected URLs, 500 times in a
row. In total, it reads around 140k pages. 

If there is an error during the test, exception will be thrown, e.g:

====
Round: 154 / 500
Round: 155 / 500
Round: 156 / 500
Exception in thread "main" java.lang.RuntimeException: java.io.IOException:
Invalid Http response
    at webcrawler.WebCrawler.getpage(WebCrawler.java:117)
    at webcrawler.WebCrawler.repeat(WebCrawler.java:191)
    at webcrawler.WebCrawler.main(WebCrawler.java:30)
Caused by: java.io.IOException: Invalid Http response
    at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1342)
    at java.net.URL.openStream(URL.java:1037)
    at webcrawler.WebCrawler.getpage(WebCrawler.java:94)
    ... 2 more
----

Sometimes exception is thrown after 5k requests, sometimes only after running
this test several times.

-Ognjen

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to