Rename AclServiceStatefulTestIPv6 to AclServiceStatefulIPv6Test 28/53828/3
authorMichael Vorburger <vorburger@redhat.com>
Fri, 24 Mar 2017 22:57:55 +0000 (23:57 +0100)
committerSam Hague <shague@redhat.com>
Sat, 25 Mar 2017 02:23:03 +0000 (02:23 +0000)
so that 'mvn test' runs it (surefire is based on *Test naming)

but @Ignore it, as it's currently completely broken (TODO fix it)

and patch IdHelper to show cause of NPE occuring in this broken test

Change-Id: I39d271cb12ff733ca617ca8869450a45d9db6571
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
vpnservice/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/AclServiceStatefulIPv6Test.java [moved from vpnservice/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/AclServiceStatefulTestIPv6.java with 95% similarity]
vpnservice/aclservice/impl/src/test/java/org/opendaylight/netvirt/aclservice/tests/IdHelper.java

@@ -7,15 +7,15 @@
  */
 package org.opendaylight.netvirt.aclservice.tests;
 
+import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.rules.MethodRule;
 import org.opendaylight.genius.datastoreutils.testutils.TestableDataTreeChangeListenerModule;
 import org.opendaylight.infrautils.inject.guice.testutils.GuiceRule;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.aclservice.config.rev160806.AclserviceConfig.SecurityGroupMode;
 
-
-public class AclServiceStatefulTestIPv6 extends AclServiceTestBaseIPv6 {
-
+@Ignore
+public class AclServiceStatefulIPv6Test extends AclServiceTestBaseIPv6 {
 
     public @Rule MethodRule guice = new GuiceRule(new AclServiceModule(),
             new AclServiceTestModule(SecurityGroupMode.Stateful),
index 2b3f81c43d53d19e204af36132cb2f3c149fda59..3256970c01154459ab52e4cf0d3d1be20de7ecab 100644 (file)
@@ -51,6 +51,10 @@ public class IdHelper {
     }
 
     public static Integer getFlowPriority(String key) {
-        return flowPriorityCacheMap.get(key);
+        Integer priority = flowPriorityCacheMap.get(key);
+        if (priority == null) {
+            throw new IllegalArgumentException(key);
+        }
+        return priority;
     }
 }