Commit f34d9ca3 authored by Maxime Sinclair's avatar Maxime Sinclair
Browse files

Consume the http response to avoid IO exception

parent a0c3fbe5
......@@ -57,6 +57,10 @@ public class TestImage extends WebappTestCase {
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss ZZZ", Locale.ENGLISH);
Date lastModified = format.parse( response.getHeaderField( "Last-Modified"));
assertTrue( "Last-Modified is not in the past", lastModified.before( new Date()));
Thread.sleep(500); // Time to receive the image
// Consume the response
InputStream responseStream = response.getInputStream();
while( != -1) {
; // Do nothing
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment