@Test public void testSubmitToDs_Exception() throws Exception { doThrow(new TransactionCommitFailedException(EXCEPTION_MESSAGE)).when(submitFuture).checkedGet(); Assert.assertFalse(DataStoreHelper.submitToDs(writeTransaction)); }
public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } }
DataStoreHelper { public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } } }
DataStoreHelper { public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } }  }
DataStoreHelper { public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } }  static Optional<T> readFromDs(LogicalDatastoreType store, InstanceIdentifier<T> path, ReadTransaction rTx); static boolean submitToDs(WriteTransaction wTx); static Optional<T> removeIfExists(LogicalDatastoreType store, InstanceIdentifier<T> path,
            ReadWriteTransaction rwTx); }
DataStoreHelper { public static boolean submitToDs(WriteTransaction wTx) { CheckedFuture<Void, TransactionCommitFailedException> submitFuture = wTx.submit(); try { submitFuture.checkedGet(); return true; } catch (TransactionCommitFailedException e) { LOG.warn("Transaction commit failed to DS.", e); return false; } }  static Optional<T> readFromDs(LogicalDatastoreType store, InstanceIdentifier<T> path, ReadTransaction rTx); static boolean submitToDs(WriteTransaction wTx); static Optional<T> removeIfExists(LogicalDatastoreType store, InstanceIdentifier<T> path,
            ReadWriteTransaction rwTx);  }