directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r376608 - in /directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test: java/org/apache/directory/server/dns/AbstractDnsTestCase.java java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java resources/log4j.properties
Date Fri, 10 Feb 2006 09:40:11 GMT
Author: akarasulu
Date: Fri Feb 10 01:40:11 2006
New Revision: 376608

URL: http://svn.apache.org/viewcvs?rev=376608&view=rev
Log:
quiet down dns tests

Added:
    directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/resources/log4j.properties
      - copied, changed from r376603, directory/sandbox/akarasulu/rc1/apacheds/server-main/log4j.properties
Modified:
    directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
    directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java?rev=376608&r1=376607&r2=376608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
(original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
Fri Feb 10 01:40:11 2006
@@ -14,7 +14,6 @@
  *   limitations under the License.
  *
  */
-
 package org.apache.directory.server.dns;
 
 import java.io.IOException;
@@ -27,32 +26,50 @@
 import org.apache.directory.server.dns.messages.ResourceRecords;
 import org.apache.mina.common.ByteBuffer;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
 public abstract class AbstractDnsTestCase extends TestCase
 {
+    private final Logger log;
     private static final int MINIMUM_DNS_DATAGRAM_SIZE = 576;
 
+    
+    public AbstractDnsTestCase()
+    {
+        log = LoggerFactory.getLogger( AbstractDnsTestCase.class );
+    }
+    
+    
+    public AbstractDnsTestCase( Class subclass )
+    {
+        log = LoggerFactory.getLogger( subclass );
+    }
+    
+    
     protected void print( DnsMessage message )
     {
-        System.out.println( message.getTransactionId() );
-        System.out.println( message.getMessageType() );
-        System.out.println( message.getOpCode() );
-        System.out.println( message.isAuthoritativeAnswer() );
-        System.out.println( message.isTruncated() );
-        System.out.println( message.isRecursionDesired() );
-        System.out.println( message.isRecursionAvailable() );
-        System.out.println( message.getResponseCode() );
+        log.debug( String.valueOf( message.getTransactionId() ) );
+        log.debug( String.valueOf( message.getMessageType() ) );
+        log.debug( String.valueOf( message.getOpCode() ) );
+        log.debug( String.valueOf( message.isAuthoritativeAnswer() ) );
+        log.debug( String.valueOf( message.isTruncated() ) );
+        log.debug( String.valueOf( message.isRecursionDesired() ) );
+        log.debug( String.valueOf( message.isRecursionAvailable() ) );
+        log.debug( String.valueOf( message.getResponseCode() ) );
 
         QuestionRecords questions = message.getQuestionRecords();
-        System.out.println( questions );
+        log.debug( String.valueOf( questions ) );
 
         ResourceRecords records = message.getAnswerRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
 
         records = message.getAuthorityRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
 
         records = message.getAdditionalRecords();
-        System.out.println( records );
+        log.debug( String.valueOf( records ) );
     }
 
     protected ByteBuffer getByteBufferFromFile( String file ) throws IOException

Modified: directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java?rev=376608&r1=376607&r2=376608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
(original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/java/org/apache/directory/server/dns/protocol/DnsMessageDecoderTest.java
Fri Feb 10 01:40:11 2006
@@ -17,15 +17,24 @@
 
 package org.apache.directory.server.dns.protocol;
 
+
 import org.apache.directory.server.dns.AbstractDnsTestCase;
 import org.apache.directory.server.dns.messages.DnsMessage;
 import org.apache.directory.server.dns.protocol.DnsDecoder;
 import org.apache.mina.common.ByteBuffer;
 
+
 public class DnsMessageDecoderTest extends AbstractDnsTestCase
 {
     private ByteBuffer requestByteBuffer;
 
+
+    public DnsMessageDecoderTest()
+    {
+        super( DnsMessageDecoderTest.class );
+    }
+
+
     public void testParseQuery() throws Exception
     {
         requestByteBuffer = getByteBufferFromFile( "DNS-QUERY.pdu" );
@@ -35,6 +44,7 @@
 
         print( dnsRequest );
     }
+
 
     public void testParseResponse() throws Exception
     {

Copied: directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/resources/log4j.properties
(from r376603, directory/sandbox/akarasulu/rc1/apacheds/server-main/log4j.properties)
URL: http://svn.apache.org/viewcvs/directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/resources/log4j.properties?p2=directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/resources/log4j.properties&p1=directory/sandbox/akarasulu/rc1/apacheds/server-main/log4j.properties&r1=376603&r2=376608&rev=376608&view=diff
==============================================================================
--- directory/sandbox/akarasulu/rc1/apacheds/server-main/log4j.properties (original)
+++ directory/sandbox/akarasulu/rc1/apacheds/protocol-dns/src/test/resources/log4j.properties
Fri Feb 10 01:40:11 2006
@@ -1,12 +1,5 @@
-log4j.rootCategory=WARN, stdout
+log4j.rootCategory=OFF, stdout
 
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[%d{HH:mm:ss}] %p [%c] - %m%n
-
-# with these we'll not get innundated when switching to DEBUG
-log4j.logger.org.apache.directory.shared.ldap.name=WARN
-log4j.logger.org.springframework=WARN
-log4j.logger.org.apache.directory.shared.codec=WARN
-log4j.logger.org.apache.directory.shared.asn1=WARN
-



Mime
View raw message