summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jeff Hao <jeffhao@google.com> 2016-06-16 11:29:42 -0700
committer Jeff Hao <jeffhao@google.com> 2016-06-16 11:29:42 -0700
commitd7ceb51bb3a108e557f50998a539bf46ec510bf8 (patch)
treee8bbb8ef377bf481dd356188b543086ee5c841e7
parent48f9f28c9b7b0b9c0f6339da8df2aa41c89d0254 (diff)
For deadlock test, print out any unexpected exceptions.
Bug: 28663029 Change-Id: Icd10cabdde282f292fd997c3a8ad9dd6d1a14e0e
-rw-r--r--test/033-class-init-deadlock/src/Main.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/033-class-init-deadlock/src/Main.java b/test/033-class-init-deadlock/src/Main.java
index 3346aa6813..bd4d4ab7b5 100644
--- a/test/033-class-init-deadlock/src/Main.java
+++ b/test/033-class-init-deadlock/src/Main.java
@@ -36,7 +36,8 @@ public class Main {
thread1.start();
thread2.start();
- try { barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { barrier.await(); } catch (Exception e) { System.out.println(e); }
try { Thread.sleep(6000); } catch (InterruptedException ie) { }
System.out.println("Deadlock test interrupting threads.");
@@ -51,7 +52,8 @@ public class Main {
class A {
static {
- try { Main.barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { Main.barrier.await(); } catch (Exception e) { System.out.println(e); }
new B();
System.out.println("A initialized");
Main.aInitialized = true;
@@ -60,7 +62,8 @@ class A {
class B {
static {
- try { Main.barrier.await(); } catch (Exception e) { }
+ // Not expecting any exceptions, so print them out if we get them.
+ try { Main.barrier.await(); } catch (Exception e) { System.out.println(e); }
new A();
System.out.println("B initialized");
Main.bInitialized = true;