Adjust to yangtools-2.0.0 changes
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / ShardTransactionTest.java
index 84bc87238a70a9745d510eda4f6c17c8b488d66d..0d65faa0600246761e25f12f5a9db6e5ec6be75e 100644 (file)
@@ -319,8 +319,8 @@ public class ShardTransactionTest extends AbstractActorTest {
                 watcher.expectMsgClass(duration("5 seconds"), Terminated.class);
 
                 if (failure != null) {
-                    Throwables.propagateIfInstanceOf(failure.cause(), Exception.class);
-                    Throwables.propagate(failure.cause());
+                    Throwables.propagateIfPossible(failure.cause(), Exception.class);
+                    throw new RuntimeException(failure.cause());
                 }
             }
         };
@@ -348,8 +348,9 @@ public class ShardTransactionTest extends AbstractActorTest {
                 watcher.expectMsgClass(duration("5 seconds"), Terminated.class);
 
                 if (failure != null) {
-                    Throwables.propagateIfInstanceOf(failure.cause(), Exception.class);
-                    Throwables.propagate(failure.cause());
+                    Throwables.throwIfInstanceOf(failure.cause(), Exception.class);
+                    Throwables.throwIfUnchecked(failure.cause());
+                    throw new RuntimeException(failure.cause());
                 }
             }
         };