Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/ThreadSafetyTest.java @ 15096:dcc0f31b2bfb
Truffle: Make ThreadSafetyTest scream louder if an assertion fails.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 14 Apr 2014 22:36:16 +0200 |
parents | 5634b199c4da |
children | 6acf45a1e7e2 |
comparison
equal
deleted
inserted
replaced
15095:6133189d8eea | 15096:dcc0f31b2bfb |
---|---|
22 */ | 22 */ |
23 package com.oracle.truffle.api.test; | 23 package com.oracle.truffle.api.test; |
24 | 24 |
25 import static org.junit.Assert.*; | 25 import static org.junit.Assert.*; |
26 | 26 |
27 import java.io.*; | |
28 import java.util.*; | 27 import java.util.*; |
29 import java.util.concurrent.*; | 28 import java.util.concurrent.*; |
30 import java.util.concurrent.atomic.*; | 29 import java.util.concurrent.atomic.*; |
31 | 30 |
32 import org.junit.*; | 31 import org.junit.*; |
66 try { | 65 try { |
67 Object result = target.call(new Object[]{5}); | 66 Object result = target.call(new Object[]{5}); |
68 assertEquals(expectedResult, result); | 67 assertEquals(expectedResult, result); |
69 ai.incrementAndGet(); | 68 ai.incrementAndGet(); |
70 } catch (Throwable t) { | 69 } catch (Throwable t) { |
71 PrintStream out = System.out; | 70 t.printStackTrace(System.out); |
72 out.println(t); | |
73 } | 71 } |
74 } | 72 } |
75 }); | 73 }); |
76 } | 74 } |
77 executorService.shutdown(); | 75 executorService.shutdown(); |