X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FTransactionChainProxyTest.java;h=9fd0849bf16199682fbc3c3bc5ea631ba5884751;hp=78266df646e8ca47daa83a29900ae3f0263ef7dd;hb=5e7cf2452ef634dc934a3ea5a2dd95059fbab68c;hpb=5464f50be733df1bbbe31cf05665d542d3b7c5e7 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java index 78266df646..9fd0849bf1 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionChainProxyTest.java @@ -152,18 +152,15 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { final AtomicReference caughtEx = new AtomicReference<>(); final CountDownLatch write2Complete = new CountDownLatch(1); - new Thread() { - @Override - public void run() { - try { - writeTx2.write(TestModel.OUTER_LIST_PATH, writeNode2); - } catch (Exception e) { - caughtEx.set(e); - } finally { - write2Complete.countDown(); - } + new Thread(() -> { + try { + writeTx2.write(TestModel.OUTER_LIST_PATH, writeNode2); + } catch (Exception e) { + caughtEx.set(e); + } finally { + write2Complete.countDown(); } - }.start(); + }).start(); assertEquals("Tx 2 write should've completed", true, write2Complete.await(5, TimeUnit.SECONDS)); @@ -224,18 +221,15 @@ public class TransactionChainProxyTest extends AbstractTransactionProxyTest { final AtomicReference caughtEx = new AtomicReference<>(); final CountDownLatch write2Complete = new CountDownLatch(1); - new Thread() { - @Override - public void run() { - try { - writeTx2.write(TestModel.OUTER_LIST_PATH, writeNode2); - } catch (Exception e) { - caughtEx.set(e); - } finally { - write2Complete.countDown(); - } + new Thread(() -> { + try { + writeTx2.write(TestModel.OUTER_LIST_PATH, writeNode2); + } catch (Exception e) { + caughtEx.set(e); + } finally { + write2Complete.countDown(); } - }.start(); + }).start(); assertEquals("Tx 2 write should've completed", true, write2Complete.await(5, TimeUnit.SECONDS));