Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPN-1758 - ClassCastException is thrown when an exception occurs during ... #861

Closed
wants to merge 1 commit into from

Conversation

mmarkus
Copy link
Contributor

@mmarkus mmarkus commented Jan 19, 2012

@ghost ghost assigned danberindei Jan 19, 2012
assert cache(1).get("k").equals("v");
}

public void testExceptionDuringGet() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test could be more elegant if you remove the catch section, which btw is lacking a fail() at the end of the try section to make sure the exception is thrown, if you add expectException, i.e.

@Test(expectedExceptions = RuntimeException.class,
      expectedExceptionsMessageRegExp = "Induced!")
public void testExceptionDuringGet() {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

both very valid points - thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've re-issued btw.

@galderz galderz closed this Jan 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants