X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsamples%2Fclustering-test-app%2Fprovider%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fclustering%2Fit%2Fprovider%2Fimpl%2FWriteTransactionsHandler.java;h=c4abb391e64b94e59a5058d018d887af3e55d680;hp=e4236abc7b38adf6c55034d696ff2ad2e6e5ac32;hb=c078e3e33bb956b1b2d59b2410f90df5d03f0a64;hpb=1b24ce7d52a5acb3bb48bb6ae0724c4909220039 diff --git a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/WriteTransactionsHandler.java b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/WriteTransactionsHandler.java index e4236abc7b..c4abb391e6 100644 --- a/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/WriteTransactionsHandler.java +++ b/opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/WriteTransactionsHandler.java @@ -189,8 +189,8 @@ public class WriteTransactionsHandler implements Runnable { tx.put(LogicalDatastoreType.CONFIGURATION, itemListId, mapBuilder.build()); try { - tx.submit().checkedGet(); - } catch (final TransactionCommitFailedException e) { + tx.submit().checkedGet(125, TimeUnit.SECONDS); + } catch (final TransactionCommitFailedException | TimeoutException e) { LOG.warn("Unable to fill the initial item list.", e); settableFuture.set(RpcResultBuilder.failed() .withError(RpcError.ErrorType.APPLICATION, "Unexpected-exception", e).build()); @@ -234,7 +234,8 @@ public class WriteTransactionsHandler implements Runnable { final ListenableFuture> allFutures = Futures.allAsList(futures); try { - allFutures.get(30, TimeUnit.SECONDS); + // Timeout from cds should be 2 minutes so leave some leeway. + allFutures.get(125, TimeUnit.SECONDS); LOG.debug("All futures completed successfully.");