Increased timeout to 5s for gzip tests.

Writing large mp3's 1 byte with flush can be slow and 2s was not enough.
This commit is contained in:
Greg Wilkins 2014-11-12 13:51:31 +11:00
parent 5fe992bf04
commit e0fbd6d9f2
3 changed files with 11 additions and 8 deletions

View File

@ -137,7 +137,10 @@ public class GzipFilterContentLengthTest
tester.start();
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),5,TimeUnit.SECONDS);
if (response.getStatus()!=200)
System.err.println("DANG!!!! "+response);
assertThat("Response status", response.getStatus(), is(HttpStatus.OK_200));

View File

@ -164,7 +164,7 @@ public class GzipFilterDefaultTest
tester.assertIsResponseGzipCompressed("POST","file.txt");
tester.assertIsResponseGzipCompressed("WIBBLE","file.txt");
response = tester.executeRequest("GET","/context/file.txt",2,TimeUnit.SECONDS);
response = tester.executeRequest("GET","/context/file.txt",5,TimeUnit.SECONDS);
assertThat("Response status",response.getStatus(),is(HttpStatus.OK_200));
assertThat("Content-Encoding",response.get("Content-Encoding"),not(containsString(compressionType)));
@ -225,7 +225,7 @@ public class GzipFilterDefaultTest
HttpTester.Response response;
response = tester.executeRequest("GET","/context/empty.txt",2,TimeUnit.SECONDS);
response = tester.executeRequest("GET","/context/empty.txt",5,TimeUnit.SECONDS);
assertThat("Response status",response.getStatus(),is(HttpStatus.OK_200));
assertThat("Content-Encoding",response.get("Content-Encoding"),not(containsString(compressionType)));
@ -569,7 +569,7 @@ public class GzipFilterDefaultTest
{
tester.start();
HttpTester.Response response = tester.executeRequest("GET","/context/",2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest("GET","/context/",5,TimeUnit.SECONDS);
assertThat("Response status",response.getStatus(),is(HttpStatus.NO_CONTENT_204));
assertThat("Content-Encoding",response.get("Content-Encoding"),not(containsString(compressionType)));
@ -599,7 +599,7 @@ public class GzipFilterDefaultTest
{
tester.start();
HttpTester.Response response = tester.executeRequest("GET","/context/",2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest("GET","/context/",5,TimeUnit.SECONDS);
assertThat("Response status",response.getStatus(),is(HttpStatus.BAD_REQUEST_400));
assertThat("Content-Encoding",response.get("Content-Encoding"),not(containsString(compressionType)));
@ -736,7 +736,7 @@ public class GzipFilterDefaultTest
public HttpTester.Response assertIsResponseNotGzipCompressed(GzipTester tester, String method, String filename, int expectedFilesize, int status)
throws Exception
{
HttpTester.Response response = tester.executeRequest(method,"/context/" + filename,2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest(method,"/context/" + filename,5,TimeUnit.SECONDS);
assertThat("Response status",response.getStatus(),is(status));
assertThat("Content-Encoding",response.get("Content-Encoding"),not(containsString(compressionType)));

View File

@ -139,7 +139,7 @@ public class GzipFilterLayeredTest
tester.start();
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),5,TimeUnit.SECONDS);
assertThat("Response status", response.getStatus(), is(HttpStatus.OK_200));
@ -186,7 +186,7 @@ public class GzipFilterLayeredTest
tester.start();
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),2,TimeUnit.SECONDS);
HttpTester.Response response = tester.executeRequest("GET","/context/" + testFile.getName(),5,TimeUnit.SECONDS);
assertThat("Response status", response.getStatus(), is(HttpStatus.OK_200));