logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject cvs commit: logging-log4j/tests build.xml
Date Sat, 06 Mar 2004 16:36:38 GMT
sdeboy      2004/03/06 08:36:38

  Modified:    src/java/org/apache/log4j/chainsaw/receivers known.receivers
                        ReceiversHelper.java
               tests/src/java/org/apache/log4j DeadlockTest.java
               tests/src/java/org/apache/log4j/chainsaw/receivers
                        ReceiversHelperTest.java
               tests    build.xml
  Log:
  - excluding receiverhelper test for now from test build (chainsaw packages not part of log4j
core build)
  - updated receiverhelpertest - added new receivers
  - updated receiverhelper to support comments (#) and blank lines
  - updated known.receivers - added comment to remind committer to modify receiverhelpertest
  - added constructor to deadlock test case to work with older junit jars
  
  Revision  Changes    Path
  1.4       +3 -0      logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/known.receivers
  
  Index: known.receivers
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/known.receivers,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- known.receivers	29 Feb 2004 20:23:40 -0000	1.3
  +++ known.receivers	6 Mar 2004 16:36:37 -0000	1.4
  @@ -1,3 +1,6 @@
  +# NOTE: if a receiver is added to this list, also change 
  +# tests/src/java/org/apache/log4j/chainsaw/receivers/ReceiversHelperTest.java test case
  +
   org.apache.log4j.net.MulticastReceiver
   org.apache.log4j.net.SocketHubReceiver
   org.apache.log4j.net.SocketReceiver
  
  
  
  1.3       +3 -2      logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/ReceiversHelper.java
  
  Index: ReceiversHelper.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/chainsaw/receivers/ReceiversHelper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ReceiversHelper.java	27 Feb 2004 16:47:31 -0000	1.2
  +++ ReceiversHelper.java	6 Mar 2004 16:36:37 -0000	1.3
  @@ -22,7 +22,6 @@
   import java.util.ArrayList;
   import java.util.Collections;
   import java.util.List;
  -import java.util.Properties;
   
   import org.apache.log4j.helpers.LogLog;
   
  @@ -46,7 +45,6 @@
        */
       private ReceiversHelper() {
   
  -        Properties p = new Properties();
           URL url = this.getClass().getClassLoader().getResource(
               this.getClass().getPackage().getName().replace('.','/') + "/known.receivers");
   
  @@ -58,6 +56,9 @@
               while ((line = stream.readLine()) != null) {
   
                   try {
  +                    if (line.startsWith("#") || (line.length() == 0)) {
  +                        continue;
  +                    }
                       Class receiverClass = Class.forName(line);
                       receiverClassList.add(receiverClass);
                       LogLog.debug("Located known Receiver class " + receiverClass.getName());
  
  
  
  1.3       +4 -0      logging-log4j/tests/src/java/org/apache/log4j/DeadlockTest.java
  
  Index: DeadlockTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/DeadlockTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DeadlockTest.java	27 Feb 2004 16:47:36 -0000	1.2
  +++ DeadlockTest.java	6 Mar 2004 16:36:37 -0000	1.3
  @@ -31,6 +31,10 @@
     static long RUNLENGTH = 10000;
     Logger logger = Logger.getLogger("DeadlockTest");
   
  +  public DeadlockTest() {
  +      super("DeadlockTest");
  +  }
  +  
     protected void setUp() throws Exception {
       super.setUp();
       System.out.println("in setup");
  
  
  
  1.2       +11 -4     logging-log4j/tests/src/java/org/apache/log4j/chainsaw/receivers/ReceiversHelperTest.java
  
  Index: ReceiversHelperTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/src/java/org/apache/log4j/chainsaw/receivers/ReceiversHelperTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ReceiversHelperTest.java	22 Dec 2003 02:42:08 -0000	1.1
  +++ ReceiversHelperTest.java	6 Mar 2004 16:36:37 -0000	1.2
  @@ -1,13 +1,16 @@
   package org.apache.log4j.chainsaw.receivers;
   
  +import java.util.List;
  +
   import junit.framework.TestCase;
   
  +import org.apache.log4j.chainsaw.receivers.ReceiversHelper;
  +import org.apache.log4j.net.MulticastReceiver;
   import org.apache.log4j.net.SocketHubReceiver;
   import org.apache.log4j.net.SocketReceiver;
   import org.apache.log4j.net.UDPReceiver;
   import org.apache.log4j.net.XMLSocketReceiver;
  -
  -import java.util.List;
  +import org.apache.log4j.varia.LogFilePatternReceiver;
   
   
   /**
  @@ -32,8 +35,12 @@
   
           Class[] expectedList =
               new Class[] {
  -                SocketHubReceiver.class, SocketReceiver.class,
  -                UDPReceiver.class, XMLSocketReceiver.class
  +                MulticastReceiver.class, 
  +                SocketHubReceiver.class, 
  +                SocketReceiver.class,
  +                UDPReceiver.class, 
  +                XMLSocketReceiver.class,
  +                LogFilePatternReceiver.class
               };
   
           for (int i = 0; i < expectedList.length; i++) {
  
  
  
  1.45      +3 -1      logging-log4j/tests/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/logging-log4j/tests/build.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- build.xml	9 Dec 2003 21:28:28 -0000	1.44
  +++ build.xml	6 Mar 2004 16:36:37 -0000	1.45
  @@ -20,6 +20,8 @@
     
     <property name="tests.source.home" value="./src/java/"/>
   
  +  <!-- The stem where most log4j source code is located. -->
  +  <property name="stem" value="org/apache/log4j"/>
   
     <path id="tests.classpath">
       <pathelement location="${project.source.home}"/>
  @@ -75,7 +77,7 @@
     <!-- ================================================================= -->
     <target name="build" depends="parentBuild, prepare">
       <javac srcdir="${tests.source.home}"
  -	   destdir="./classes"
  +	   destdir="./classes" excludes="${tests.source.home}${stem}/chainsaw/receivers/*.java"
              deprecation="${deprecation}"
              debug="on">			
         <classpath refid="tests.classpath"/>
  
  
  

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


Mime
View raw message