You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ca...@apache.org on 2005/08/19 09:09:39 UTC

cvs commit: logging-log4j/tests/src/java/org/apache/log4j/util SerializationTestHelper.java

carnold     2005/08/19 00:09:39

  Modified:    tests/src/java/org/apache/log4j/spi Tag: v1_2-branch
                        LoggingEventTest.java
               tests/src/java/org/apache/log4j/util Tag: v1_2-branch
                        SerializationTestHelper.java
  Log:
  Bug 26433: Relax serialization tests for JDK 1.2 and 1.3
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.5.2.3   +6 -6      logging-log4j/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java
  
  Index: LoggingEventTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/spi/LoggingEventTest.java,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- LoggingEventTest.java	22 Jul 2005 20:09:23 -0000	1.5.2.2
  +++ LoggingEventTest.java	19 Aug 2005 07:09:39 -0000	1.5.2.3
  @@ -56,7 +56,7 @@
   
       int[] skip = new int[] { 352, 353, 354, 355, 356 };
       SerializationTestHelper.assertSerializationEquals(
  -      "witness/serialization/simple.bin", event, skip, Integer.MAX_VALUE);
  +      "witness/serialization/simple.bin", event, skip, 365);
     }
   
     /**
  @@ -75,7 +75,7 @@
   
       int[] skip = new int[] { 352, 353, 354, 355, 356 };
       SerializationTestHelper.assertSerializationEquals(
  -      "witness/serialization/exception.bin", event, skip, 945);
  +      "witness/serialization/exception.bin", event, skip, 365);
     }
   
     /**
  @@ -94,7 +94,7 @@
   
       int[] skip = new int[] { 352, 353, 354, 355, 356 };
       SerializationTestHelper.assertSerializationEquals(
  -      "witness/serialization/location.bin", event, skip, Integer.MAX_VALUE);
  +      "witness/serialization/location.bin", event, skip, 431);
     }
   
     /**
  @@ -113,8 +113,8 @@
   
       int[] skip = new int[] { 352, 353, 354, 355, 356 };
       SerializationTestHelper.assertSerializationEquals(
  -      "witness/serialization/ndc.bin", event, skip, Integer.MAX_VALUE);
  -  }
  +      "witness/serialization/ndc.bin", event, skip, 365);
  +    }
   
     /**
      * Serialize a logging event with mdc.
  @@ -132,7 +132,7 @@
   
       int[] skip = new int[] { 352, 353, 354, 355, 356 };
       SerializationTestHelper.assertSerializationEquals(
  -      "witness/serialization/mdc.bin", event, skip, Integer.MAX_VALUE);
  +      "witness/serialization/mdc.bin", event, skip, 465);
     }
   
     /**
  
  
  
  No                   revision
  No                   revision
  1.1.2.2   +4 -1      logging-log4j/tests/src/java/org/apache/log4j/util/SerializationTestHelper.java
  
  Index: SerializationTestHelper.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/util/SerializationTestHelper.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- SerializationTestHelper.java	18 Jul 2005 17:07:39 -0000	1.1.2.1
  +++ SerializationTestHelper.java	19 Aug 2005 07:09:39 -0000	1.1.2.2
  @@ -115,7 +115,10 @@
         FileInputStream is = new FileInputStream(witnessFile);
         int bytesRead = is.read(expected);
         is.close();
  -      TestCase.assertEquals(bytesRead, actual.length);
  +
  +      if(bytesRead < endCompare) {
  +          TestCase.assertEquals(bytesRead, actual.length);
  +      }
   
         int endScan = actual.length;
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org