summaryrefslogtreecommitdiffstats
path: root/test/033-class-init-deadlock/src
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-01-31 19:18:51 -0800
committerElliott Hughes <enh@google.com>2012-01-31 19:20:20 -0800
commit741b5b7ef4c7fd4a786364bbf60d515489caff47 (patch)
treee5d5f9ee5c1fb1c177c453985eeb1242e3d73bf7 /test/033-class-init-deadlock/src
parent09cc2d39b3073ab0c613a9f660983e781693d958 (diff)
downloadart-741b5b7ef4c7fd4a786364bbf60d515489caff47.tar.gz
art-741b5b7ef4c7fd4a786364bbf60d515489caff47.tar.bz2
art-741b5b7ef4c7fd4a786364bbf60d515489caff47.zip
Manually merge my AOSP update to the VM tests.
Original change: https://android-review.googlesource.com/32051 Bug: http://code.google.com/p/android/issues/detail?id=21599 Bug: http://code.google.com/p/android/issues/detail?id=21597 Change-Id: I31e440b66b720647afab54ca39fd6eb1bbb0cb60
Diffstat (limited to 'test/033-class-init-deadlock/src')
-rw-r--r--test/033-class-init-deadlock/src/Main.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/033-class-init-deadlock/src/Main.java b/test/033-class-init-deadlock/src/Main.java
index e4ee9aeec0..32332307f5 100644
--- a/test/033-class-init-deadlock/src/Main.java
+++ b/test/033-class-init-deadlock/src/Main.java
@@ -30,11 +30,13 @@ public class Main {
thread1 = new Thread() { public void run() { new A(); } };
thread2 = new Thread() { public void run() { new B(); } };
thread1.start();
+ // Give thread1 a chance to start before starting thread2.
+ try { Thread.sleep(1000); } catch (InterruptedException ie) { }
thread2.start();
try { Thread.sleep(6000); } catch (InterruptedException ie) { }
- System.out.println("Deadlock test interupting threads.");
+ System.out.println("Deadlock test interrupting threads.");
thread1.interrupt();
thread2.interrupt();
System.out.println("Deadlock test main thread bailing.");