X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fapi%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Faction%2FActionTest.java;h=6858494283a2ec6cf0ee0e56e57d88d5a3ce5960;hb=e2f7aaa41e482815ca1d4495eb85c8653cd903ab;hp=eeddc0b9b0dc33df0424936535907ef651b13d4f;hpb=cffdfafd2b23b24025f5ba4b32f16bca501bfeb5;p=controller.git diff --git a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java index eeddc0b9b0..6858494283 100644 --- a/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java +++ b/opendaylight/sal/api/src/test/java/org/opendaylight/controller/sal/action/ActionTest.java @@ -35,8 +35,12 @@ import org.opendaylight.controller.sal.core.Node; import org.opendaylight.controller.sal.core.NodeConnector; import org.opendaylight.controller.sal.utils.EtherTypes; import org.opendaylight.controller.sal.utils.NodeConnectorCreator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class ActionTest { + protected static final Logger logger = LoggerFactory + .getLogger(ActionTest.class); @Test public void tesActionCreationValidation() { Action action = new PopVlan(); @@ -140,7 +144,7 @@ public class ActionTest { try { ip = InetAddress.getByName("171.71.9.52"); } catch (UnknownHostException e) { - e.printStackTrace(); + logger.error("",e); } action = new SetNwSrc(ip); @@ -152,7 +156,7 @@ public class ActionTest { try { ip = InetAddress.getByName("2001:420:281:1003:f2de:f1ff:fe71:728d"); } catch (UnknownHostException e) { - e.printStackTrace(); + logger.error("",e); } action = new SetNwSrc(ip); Assert.assertTrue(action.isValid()); @@ -163,9 +167,12 @@ public class ActionTest { action = new SetNwTos(0xf); Assert.assertTrue(action.isValid()); - action = new SetNwTos(0xff); + action = new SetNwTos(0x3f); Assert.assertTrue(action.isValid()); + action = new SetNwTos(0x40); + Assert.assertFalse(action.isValid()); + action = new SetNwTos(0xff1); Assert.assertFalse(action.isValid()); @@ -219,7 +226,7 @@ public class ActionTest { try { ip = InetAddress.getByName("1.1.1.1"); } catch (UnknownHostException e) { - e.printStackTrace(); + logger.error("",e); } actions.add(new SetDlSrc(mac));