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;
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;
}
/**
* 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;
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));