[
https://issues.apache.org/jira/browse/SQOOP-3090?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15770219#comment-15770219
]
Attila Szabo commented on SQOOP-3090:
-------------------------------------
Hey [~BoglarkaEgyed],
Sounds great. I'm okay with both ExpectedException, and @Test(expected=)
solutions.
Good plan to start it ASAP. However I'd like to ask to split it into two pieces
if possible (to shrink the scope of each change), and please specify all the
related tests in each JIRA (you can do it with sub tasks).
Many thanks and it's good you're working on cleaning up the codebase a bit!
[~maugli]
> Normalize test cases where expect an exception
> ----------------------------------------------
>
> Key: SQOOP-3090
> URL: https://issues.apache.org/jira/browse/SQOOP-3090
> Project: Sqoop
> Issue Type: Improvement
> Affects Versions: 1.4.6
> Reporter: Boglarka Egyed
> Assignee: Boglarka Egyed
> Priority: Minor
>
> Many test cases uses the following logic to test if an exception has been
> thrown:
> {code:java}
> try {
> <do something>
> fail("Expected exception");
> } catch (someException e) {
> // expected
> }
> }
> {code}
> This form is not self-explanatory enough and could be replaced by a one line
> ExpectedException check which would be more clean.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)