Skip to content

Commit b434209

Browse files
reynderspenberg
authored andcommitted
malva: Fixed testIsInterrupted test case
This patch fixes the testIsInterrupted test case to clear the interrupted flag so that it does not affect other tests. We can now enable the affected test cases. [ penberg@kernel.org: cleanups ] Signed-off-by: Pekka Enberg <penberg@kernel.org>
1 parent 23399c2 commit b434209

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/malva/java/lang/ThreadTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ public static void testIsInterrupted() {
112112
Thread.currentThread().interrupt();
113113
assertTrue(Thread.currentThread().isInterrupted());
114114
assertTrue(Thread.currentThread().isInterrupted());
115+
Thread.interrupted();
115116
}
116117

117118
public static void testJoin() {
@@ -132,6 +133,7 @@ public void run() {
132133
thread.join();
133134
assertEquals("true", sb.toString());
134135
} catch (InterruptedException e) {
136+
throw new RuntimeException();
135137
}
136138
}
137139

@@ -310,12 +312,11 @@ public static void main(String[] args) {
310312
testJoin();
311313
testRun();
312314
testSetContextClassloader();
313-
// FIXME
314-
// testSetDaemon();
315-
// testSetDefaultUncaughtExceptionHandler();
315+
testSetDaemon();
316+
testSetDefaultUncaughtExceptionHandler();
316317
testSetName();
317318
testSetPriority();
318-
// testSetUncaughtExceptionHandler();
319+
testSetUncaughtExceptionHandler();
319320
testSleep();
320321
testStart();
321322
testToString();

0 commit comments

Comments
 (0)