fixing ArchivingTest

Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/b2002617
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/b2002617
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/b2002617

Branch: refs/heads/tomee-7.0.0-M1
Commit: b200261787fe658ba1779cd2953b87ee85b5f30c
Parents: 94b4a96
Author: Romain Manni-Bucau <rmann...@gmail.com>
Authored: Mon Sep 28 10:47:31 2015 -0700
Committer: Romain Manni-Bucau <rmann...@gmail.com>
Committed: Mon Sep 28 10:47:31 2015 -0700

----------------------------------------------------------------------
 .../org/apache/tomee/jul/handler/rotating/ArchivingTest.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/b2002617/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/ArchivingTest.java
----------------------------------------------------------------------
diff --git 
a/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/ArchivingTest.java
 
b/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/ArchivingTest.java
index 77da90b..89215f5 100644
--- 
a/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/ArchivingTest.java
+++ 
b/tomee/tomee-juli/src/test/java/org/apache/tomee/jul/handler/rotating/ArchivingTest.java
@@ -97,18 +97,19 @@ public class ArchivingTest {
         final File logGzip = new File("target/ArchivingTest-" + format + 
"/logs/archives/test.2015-09-01.0.log." + format);
         assertTrue(logGzip.getAbsolutePath(), logGzip.isFile());
 
+        // note: size depends on the date so just use a > min
         if ("gzip".equals(format)) {
             try (final GZIPInputStream gis = new GZIPInputStream(new 
FileInputStream("target/ArchivingTest-gzip/logs/archives/test.2015-09-01.0.log.gzip")))
 {
                 final String content = IOUtils.toString(gis);
                 assertTrue(content.contains("INFO: abcdefghij\n"));
-                assertEquals(10258, content.length());
+                assertTrue(content.length() > 10000);
             }
         } else {
             try (final ZipInputStream zis = new ZipInputStream(new 
FileInputStream("target/ArchivingTest-zip/logs/archives/test.2015-09-01.0.log.zip")))
 {
                 assertEquals("test.2015-09-01.0.log", 
zis.getNextEntry().getName());
                 final String content = IOUtils.toString(zis);
                 assertTrue(content.contains("INFO: abcdefghij\n"));
-                assertEquals(10258, content.length());
+                assertTrue(content.length() > 10000);
                 assertNull(zis.getNextEntry());
             }
         }

Reply via email to