Changed TestProxy png image expected size to be between 1500 and 1700.
This commit is contained in:
@@ -21,7 +21,7 @@ public class TestProxy extends WebappTestCase {
|
|||||||
// Analyze response
|
// Analyze response
|
||||||
// Verifies the Content-Type header
|
// Verifies the Content-Type header
|
||||||
//assertEquals( "Response content type is not PNG", "image/png", response.getContentType());
|
//assertEquals( "Response content type is not PNG", "image/png", response.getContentType());
|
||||||
// Get the image and verify its size (~1533 bytes)
|
// Get the image and verify its size (~1600 bytes)
|
||||||
InputStream responseStream = response.getInputStream();
|
InputStream responseStream = response.getInputStream();
|
||||||
ByteArrayOutputStream imageStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream imageStream = new ByteArrayOutputStream();
|
||||||
byte[] buf = new byte[1024];
|
byte[] buf = new byte[1024];
|
||||||
@@ -34,7 +34,7 @@ public class TestProxy extends WebappTestCase {
|
|||||||
byte[] inMemoryImage = imageStream.toByteArray();
|
byte[] inMemoryImage = imageStream.toByteArray();
|
||||||
int diagramLen = inMemoryImage.length;
|
int diagramLen = inMemoryImage.length;
|
||||||
assertTrue( diagramLen > 1500);
|
assertTrue( diagramLen > 1500);
|
||||||
assertTrue( diagramLen < 1600);
|
assertTrue( diagramLen < 1700);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user