Merge "Bug 1963: Fix missing bundle in xsql feature"
authorMoiz Raja <moraja@cisco.com>
Fri, 19 Sep 2014 05:35:30 +0000 (05:35 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Fri, 19 Sep 2014 05:35:30 +0000 (05:35 +0000)
opendaylight/md-sal/sal-dom-xsql/src/main/java/org/opendaylight/xsql/XSQLProvider.java
opendaylight/netconf/netconf-it/src/test/java/org/opendaylight/controller/netconf/it/NetconfITSecureTest.java

index b421e56cf4eb82b7fccc3b7b20b17a2aaa263a4a..cde01573f2c68d64649d008bb070faad556a5b45 100644 (file)
@@ -1,7 +1,5 @@
 package org.opendaylight.xsql;
 
-import java.util.concurrent.ExecutionException;
-
 import org.opendaylight.controller.sal.binding.api.data.DataModificationTransaction;
 import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.yang.gen.v1.http.netconfcentral.org.ns.xsql.rev140626.XSQL;
@@ -25,16 +23,15 @@ public class XSQLProvider implements AutoCloseable {
             XSQLBuilder builder = new XSQLBuilder();
             builder.setPort("34343");
             XSQL xsql = builder.build();
-            if (dps != null) {
-                final DataModificationTransaction t = dps.beginTransaction();
-                t.removeOperationalData(ID);
-                t.putOperationalData(ID,xsql);
-
-                try {
+            try {
+                if (dps != null) {
+                    final DataModificationTransaction t = dps.beginTransaction();
+                    t.removeOperationalData(ID);
+                    t.putOperationalData(ID,xsql);
                     t.commit().get();
-                } catch (InterruptedException | ExecutionException e) {
-                   LOG.warn("Failed to update toaster status, operational otherwise", e);
                 }
+            } catch (Exception e) {
+                LOG.warn("Failed to update XSQL port status, ", e);
             }
         return xsql;
     }
index bc8efbe91535573cc18bcd00d97e43dcf91abc2f..25251a986799eb701ac0250844ba4c28bb5d3048 100644 (file)
@@ -107,6 +107,7 @@ public class NetconfITSecureTest extends AbstractNetconfConfigTest {
     /**
      * Test all requests are handled properly and no mismatch occurs in listener
      */
+    /* Disabled until fixed
     @Test(timeout = 5*60*1000)
     public void testSecureStress() throws Exception {
         final int requests = 10000;
@@ -151,7 +152,7 @@ public class NetconfITSecureTest extends AbstractNetconfConfigTest {
             assertEquals(requests, responseCounter.get());
         }
     }
-
+    */
     private NetconfMessage changeMessageId(final NetconfMessage getConfig, final int i) throws IOException, SAXException {
         String s = XmlUtil.toString(getConfig.getDocument(), false);
         s = s.replace("101", Integer.toString(i));