removed prints 30/4330/1
authorDavid Goldberg <david.goldberg@contextream.com>
Sun, 5 Jan 2014 02:06:38 +0000 (04:06 +0200)
committerDavid Goldberg <david.goldberg@contextream.com>
Sun, 5 Jan 2014 02:06:53 +0000 (04:06 +0200)
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
Change-Id: Ib9642d4335ae5a1fa3c4cad381185d412022e88c
Signed-off-by: David Goldberg <david.goldberg@contextream.com>
commons/unittest_tools/pom.xml
commons/unittest_tools/src/main/java/org/opendaylight/lispflowmapping/tools/junit/BaseExpectations.java
mappingservice/integrationtest/src/test/java/org/opendaylight/lispflowmapping/integrationtest/MappingServiceIntegrationTest.java
mappingservice/southbound/src/main/java/org/opendaylight/lispflowmapping/southbound/LispSouthboundPlugin.java
mappingservice/southbound/src/test/java/org/opendaylight/lispflowmapping/southbound/lisp/LispSouthboundServiceTest.java

index 705279e68ac68a15d0ba42c6cbfc0be6b11162a7..23ae22ba8529cf539312c5475ef30a43495a7fb1 100644 (file)
                        <groupId>junit-addons</groupId>
                        <artifactId>junit-addons</artifactId>
                </dependency>
+               <dependency>
+<groupId>org.slf4j</groupId>
+<artifactId>slf4j-api</artifactId>
+<version>1.6.1</version>
+</dependency>
+               
        </dependencies>
 </project>
index 82a25b1dc157c06aaf67259fde165b07ebbf7394..daaf6b80d62f4aa781cee93e373604b5a2bef109 100644 (file)
@@ -33,11 +33,14 @@ import org.jmock.syntax.ReceiverClause;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class BaseExpectations extends Expectations {
     protected Mockery context;
     protected boolean showAllExpectations;
     private final Synchroniser synchroniser = new Synchroniser();
+    protected static final Logger logger = LoggerFactory.getLogger(BaseExpectations.class);
 
     @Before
     public void before() throws Exception {
@@ -233,7 +236,7 @@ public class BaseExpectations extends Expectations {
             values.add(lastValue);
             boolean match = match(lastValue);
             if (match && (logMatch != null)) {
-                System.out.println("Match: " + logMatch + " " + value);
+                logger.debug("Match: " + logMatch + " " + value);
             }
             return match;
         }
@@ -259,7 +262,7 @@ public class BaseExpectations extends Expectations {
 
         public Object invoke(Invocation invocation) throws Throwable {
             if (logInvocation) {
-                System.out.println("Invoke: returning " + lastValue);
+                logger.debug("Invoke: returning " + lastValue);
             }
             return lastValue;
         }
index 93fb662125cb74e0d3a66f417ed9c7f60c466cc4..dd7f7915bdd8998acb884234fd7834da8f85fe60 100644 (file)
@@ -1555,7 +1555,7 @@ public class MappingServiceIntegrationTest {
             int state = element.getState();
             logger.debug("Bundle:" + element.getSymbolicName() + ",v" + element.getVersion() + ", state:" + stateToString(state));
             if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                System.out.println("Bundle:" + element.getSymbolicName() + " state:" + stateToString(state));
+                logger.debug("Bundle:" + element.getSymbolicName() + " state:" + stateToString(state));
 
                 // UNCOMMENT to see why bundles didn't resolve!
 
index e37e2ff0eff80e8f38a8f29e6e40dba584625ff1..4d9fe5b8c1d9cd8edae333fb893aea286ccd0597 100644 (file)
@@ -111,7 +111,8 @@ public class LispSouthboundPlugin extends AbstractBindingAwareProvider implement
                 } catch (IOException e) {
                     logger.error("IO Exception while trying to recieve packet", e);
                 }
-                logger.debug("Handling packet from {}:{} (len={})", packet.getAddress().getHostAddress(), packet.getPort(), packet.getLength());
+                logger.debug(String.format("Handling packet from {%s}:{%d} (len={%d})", packet.getAddress().getHostAddress(), packet.getPort(),
+                        packet.getLength()));
 
                 try {
                     lispSouthboundService.handlePacket(packet);
index 3689df5013bf90a0c4ffc45dde045f94992386ba..adb028ae371b9311b0bf3cb8723791c3fddb3a68 100644 (file)
@@ -294,7 +294,6 @@ public class LispSouthboundServiceTest extends BaseTestCase {
         handleMapRegisterPacket(mapRegisterPacket);
 
         EidToLocatorRecord eidToLocator = lastMapRegister().getEidToLocatorRecord().get(0);
-        System.out.println(((Ipv4) LispAFIConvertor.toAFI(eidToLocator.getLispAddressContainer())).getIpv4Address().getValue());
         assertEquals(getIP("153.16.254.1"), LispAFIConvertor.toAFI(eidToLocator.getLispAddressContainer()));
 
         assertEquals(1, eidToLocator.getLocatorRecord().size());
@@ -472,8 +471,6 @@ public class LispSouthboundServiceTest extends BaseTestCase {
 
         handleMapRequestAsByteArray(mapRequestPacket);
         assertEquals(getIPV6("2610:d0:ffff:192:0:0:0:1"), LispAFIConvertor.toAFI(lastMapRequest().getSourceEid().getLispAddressContainer()));
-        System.out.println(((Ipv6) LispAFIConvertor.toAFI(lastMapRequest().getEidRecord().get(0).getLispAddressContainer())).getIpv6Address()
-                .getValue());
         assertEquals(getIPV6("2610:d0:ffff:192:0:0:0:2"), LispAFIConvertor.toAFI(lastMapRequest().getEidRecord().get(0).getLispAddressContainer()));
     }