Skip to content

Commit 0ffa8c6

Browse files
author
Ahmed Tawila
committed
revert sneaky runnable fix attempt
1 parent afd142c commit 0ffa8c6

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎core-java/src/test/java/com/baeldung/sneakythrows/SneakyRunnableTest.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66

77
public class SneakyRunnableTest {
88

9-
@Test(expected = InterruptedException.class)
9+
@Test
1010
public void whenCallSneakyRunnableMethod_thenThrowException() {
11-
new SneakyRunnable().run();
11+
try {
12+
new SneakyRunnable().run();
13+
} catch (Exception e) {
14+
assertEquals(InterruptedException.class, e.getStackTrace());
15+
}
1216
}
1317
}

0 commit comments

Comments
 (0)