Fix broken SouthboundIT test
[ovsdb.git] / southbound / southbound-it / src / test / java / org / opendaylight / ovsdb / southbound / it / AbstractConfigTestBase.java
index ce4812929ed9404504e7b3420e9778b7a95f351f..4a7d1146a437d05b4778004cda2812daf52655b9 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.ovsdb.southbound.it;
 
 import static org.ops4j.pax.exam.CoreOptions.maven;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut;
-import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
+//import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
 import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;
 
@@ -22,6 +22,7 @@ import java.util.Calendar;
 import javax.management.InstanceNotFoundException;
 
 import org.junit.Rule;
+import org.junit.internal.AssumptionViolatedException;
 import org.junit.rules.TestRule;
 import org.junit.rules.TestWatcher;
 import org.junit.runner.Description;
@@ -73,10 +74,15 @@ public abstract class AbstractConfigTestBase {
     }
 
     public MavenArtifactUrlReference getKarafDistro() {
-        MavenArtifactUrlReference karafUrl = maven()
+        /*MavenArtifactUrlReference karafUrl = maven()
                 .groupId("org.opendaylight.controller")
                 .artifactId("opendaylight-karaf-empty")
                 .version("1.5.0-SNAPSHOT")
+                .type("zip");*/
+        MavenArtifactUrlReference karafUrl = maven()
+                .groupId("org.opendaylight.ovsdb")
+                .artifactId("southbound-karaf")
+                .version("1.1.0-SNAPSHOT")
                 .type("zip");
         return karafUrl;
     }
@@ -90,7 +96,7 @@ public abstract class AbstractConfigTestBase {
                         .unpackDirectory(new File("target/exam"))
                         .useDeployFolder(false),
                 keepRuntimeFolder(),
-                features(getFeatureRepo() , getFeatureName())
+                //features(getFeatureRepo() , getFeatureName())
         };
         options = ObjectArrays.concat(options, getFeaturesOptions(), Option.class);
         options = ObjectArrays.concat(options, getLoggingOptions(), Option.class);
@@ -126,13 +132,27 @@ public abstract class AbstractConfigTestBase {
     public TestRule watcher = new TestWatcher() {
         @Override
         protected void starting(Description description) {
-            LOG.info("TestWatcher: Starting test: {}",
-                    description.getDisplayName());
+            LOG.info("TestWatcher: Starting test:\n{}", description.getDisplayName());
         }
 
         @Override
         protected void finished(Description description) {
-            LOG.info("TestWatcher: Finished test: {}", description.getDisplayName());
+            LOG.info("TestWatcher: Finished test:\n{}", description.getDisplayName());
+        }
+
+        @Override
+        protected void succeeded(Description description) {
+            LOG.info("TestWatcher: Test succeeded:\n{}", description.getDisplayName());
+        }
+
+        @Override
+        protected void failed(Throwable ex, Description description) {
+            LOG.info("TestWatcher: Test failed:\n{} ", description.getDisplayName(), ex);
+        }
+
+        @Override
+        protected void skipped(AssumptionViolatedException ex, Description description) {
+            LOG.info("TestWatcher: Test skipped:\n{} ", description.getDisplayName(), ex);
         }
     };
 }