diff --git a/src/test/java/net/sourceforge/plantuml/servlet/AllTests.java b/src/test/java/net/sourceforge/plantuml/servlet/AllTests.java index 13dbd3d..c2688b4 100644 --- a/src/test/java/net/sourceforge/plantuml/servlet/AllTests.java +++ b/src/test/java/net/sourceforge/plantuml/servlet/AllTests.java @@ -11,8 +11,8 @@ public class AllTests extends TestSuite { suite.addTestSuite(TestForm.class); suite.addTestSuite(TestImage.class); suite.addTestSuite(TestAsciiArt.class); - //suite.addTestSuite(TestSVG.class); - //suite.addTestSuite(TestProxy.class); + suite.addTestSuite(TestSVG.class); + suite.addTestSuite(TestProxy.class); //$JUnit-END$ return suite; } diff --git a/src/test/java/net/sourceforge/plantuml/servlet/TestImage.java b/src/test/java/net/sourceforge/plantuml/servlet/TestImage.java index be183ba..dcfb176 100644 --- a/src/test/java/net/sourceforge/plantuml/servlet/TestImage.java +++ b/src/test/java/net/sourceforge/plantuml/servlet/TestImage.java @@ -31,11 +31,12 @@ public class TestImage extends WebappTestCase { imageStream.write( buf, 0, n); } imageStream.close(); - responseStream.close(); byte[] inMemoryImage = imageStream.toByteArray(); int diagramLen = inMemoryImage.length; assertTrue( diagramLen > 10000); assertTrue( diagramLen < 20000); + Thread.sleep(500); + responseStream.close(); } /** diff --git a/src/test/java/net/sourceforge/plantuml/servlet/TestProxy.java b/src/test/java/net/sourceforge/plantuml/servlet/TestProxy.java index eeaa2b1..c35c8a4 100644 --- a/src/test/java/net/sourceforge/plantuml/servlet/TestProxy.java +++ b/src/test/java/net/sourceforge/plantuml/servlet/TestProxy.java @@ -21,7 +21,7 @@ public class TestProxy extends WebappTestCase { // Analyze response // Verifies the Content-Type header //assertEquals( "Response content type is not PNG", "image/png", response.getContentType()); - // Get the image and verify its size (~1600 bytes) + // Get the image and verify its size (~2000 bytes) InputStream responseStream = response.getInputStream(); ByteArrayOutputStream imageStream = new ByteArrayOutputStream(); byte[] buf = new byte[1024]; @@ -34,7 +34,7 @@ public class TestProxy extends WebappTestCase { byte[] inMemoryImage = imageStream.toByteArray(); int diagramLen = inMemoryImage.length; assertTrue( diagramLen > 1500); - assertTrue( diagramLen < 1700); + assertTrue( diagramLen < 2500); } public void testProxyWithFormat() throws Exception { @@ -48,8 +48,8 @@ public class TestProxy extends WebappTestCase { // Get the content and verify its size String diagram = response.getText(); int diagramLen = diagram.length(); - assertTrue( diagramLen > 1700); - assertTrue( diagramLen < 1800); + assertTrue( diagramLen > 1000); + assertTrue( diagramLen < 3000); } /** diff --git a/src/test/java/net/sourceforge/plantuml/servlet/TestSVG.java b/src/test/java/net/sourceforge/plantuml/servlet/TestSVG.java index 4a960df..eafc9eb 100644 --- a/src/test/java/net/sourceforge/plantuml/servlet/TestSVG.java +++ b/src/test/java/net/sourceforge/plantuml/servlet/TestSVG.java @@ -19,8 +19,8 @@ public class TestSVG extends WebappTestCase { // Get the content and verify its size String diagram = response.getText(); int diagramLen = diagram.length(); - assertTrue( diagramLen > 1700); - assertTrue( diagramLen < 1800); + assertTrue( diagramLen > 1000); + assertTrue( diagramLen < 3000); } }