SupervisorStrategy caught throwable - logging 82/10082/2
authorBasheeruddin Ahmed <syedbahm@cisco.com>
Wed, 20 Aug 2014 01:10:50 +0000 (18:10 -0700)
committerBasheeruddin Ahmed <syedbahm@cisco.com>
Wed, 20 Aug 2014 18:18:08 +0000 (11:18 -0700)
logging stacktrace at warning level
patch2: increased timeout for one of the test case as build was failing

Change-Id: Ia09dcfacd90f11ad725c7601e0a71ac3983f0dbf
Signed-off-by: Basheeruddin Ahmed <syedbahm@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ThreePhaseCommitCohortFailureTest.java

index 3396eb556456116005459540c66a78119ca64767..2972772a4840cf5117ef3b9c9ca2cb4947d2352c 100644 (file)
@@ -295,7 +295,12 @@ public class ShardManager extends AbstractUntypedActor {
             new Function<Throwable, SupervisorStrategy.Directive>() {
                 @Override
                 public SupervisorStrategy.Directive apply(Throwable t) {
-                    LOG.warning("Supervisor Strategy of resume applied {}",t);
+                    StringBuilder sb = new StringBuilder();
+                    for(StackTraceElement element : t.getStackTrace()) {
+                       sb.append("\n\tat ")
+                         .append(element.toString());
+                    }
+                    LOG.warning("Supervisor Strategy of resume applied {}",sb.toString());
                     return SupervisorStrategy.resume();
                 }
             }
index 870889b350aae84982164109255bda969960628f..34697977a5a4639e4b507dde478302834eae5ad5 100644 (file)
@@ -63,7 +63,7 @@ public class ThreePhaseCommitCohortFailureTest extends AbstractActorTest {
         store.onGlobalContextUpdated(testSchemaContext);
     }
 
-    private FiniteDuration ASK_RESULT_DURATION = Duration.create(3000, TimeUnit.MILLISECONDS);
+    private FiniteDuration ASK_RESULT_DURATION = Duration.create(5000, TimeUnit.MILLISECONDS);
 
 
     @Test(expected = TestException.class)