Skip to content

Commit acfb3fa

Browse files
author
David R. MacIver
committed
add test for correct stack trace when rethrowing exception
1 parent d1dc669 commit acfb3fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/src/com/rabbitmq/client/test/ValueOrExceptionTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public void testClonesException() {
7474
} catch(InsufficientMagicException returnedException) {
7575
assertTrue(returnedException != exception);
7676
assertEquals(returnedException.getMessage(), exception.getMessage());
77+
boolean inGetValue = false;
78+
for(StackTraceElement elt : returnedException.getStackTrace())
79+
inGetValue |= "getValue".equals(elt.getMethodName());
80+
assertTrue(inGetValue);
7781
}
7882
}
7983
}

0 commit comments

Comments
 (0)