(Thread thread)
| 66 | private static final int THREAD_TIMEOUT = 5000; |
| 67 | |
| 68 | protected void waitFor(Thread thread) { |
| 69 | long start = System.currentTimeMillis(); |
| 70 | while (thread.isAlive()) { |
| 71 | try { |
| 72 | Thread.sleep(10); |
| 73 | } catch (InterruptedException e) { |
| 74 | } |
| 75 | if (System.currentTimeMillis() - start > THREAD_TIMEOUT) { |
| 76 | fail("Timed out waiting for native thread " + thread |
| 77 | + " to detach and terminate"); |
| 78 | } |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | public static class SmallTestStructure extends Structure { |
| 83 | public static final List<String> FIELDS = createFieldsOrder("value"); |
no test coverage detected