[jira] [Commented] (HBASE-11628) Clean up tests that expect an exception
[ https://issues.apache.org/jira/browse/HBASE-11628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14133366#comment-14133366 ] Dima Spivak commented on HBASE-11628: - I'd like to work on this next week, if that's alright. I'm really excited about getting more familiar with our unit tests in general and committing myself to this seems like good motivation. :) Clean up tests that expect an exception --- Key: HBASE-11628 URL: https://issues.apache.org/jira/browse/HBASE-11628 Project: HBase Issue Type: Sub-task Components: test Reporter: Sean Busbey Assignee: Dima Spivak Priority: Trivial Labels: beginner We have a few tests that look for expected exceptions by manually catching and explicitly failing in case no exception happens. Places that need to be fixed can be found by running: {code} $ grep -rie [^n]expected *exception `find . -name test -path '*/src/*' -type d | xargs` {code} (there are some false positives, e.g. TestIPv6NIOServerSocketChannel) We should clean these up to use [JUnit's expected arg to the Test annotation|http://junit.org/javadoc/4.11/org/junit/Test.html#expected()]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-11628) Clean up tests that expect an exception
[ https://issues.apache.org/jira/browse/HBASE-11628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14133513#comment-14133513 ] Sean Busbey commented on HBASE-11628: - That sounds great. When you have a patch, please put it up on reviewboard and address it to the hbase group. Feel free to add me as a reviewer as well. Clean up tests that expect an exception --- Key: HBASE-11628 URL: https://issues.apache.org/jira/browse/HBASE-11628 Project: HBase Issue Type: Sub-task Components: test Reporter: Sean Busbey Assignee: Dima Spivak Priority: Trivial Labels: beginner We have a few tests that look for expected exceptions by manually catching and explicitly failing in case no exception happens. Places that need to be fixed can be found by running: {code} $ grep -rie [^n]expected *exception `find . -name test -path '*/src/*' -type d | xargs` {code} (there are some false positives, e.g. TestIPv6NIOServerSocketChannel) We should clean these up to use [JUnit's expected arg to the Test annotation|http://junit.org/javadoc/4.11/org/junit/Test.html#expected()]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (HBASE-11628) Clean up tests that expect an exception
[ https://issues.apache.org/jira/browse/HBASE-11628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14081975#comment-14081975 ] Anoop Sam John commented on HBASE-11628: In tests where we have some more test code after catch, we wont be able to do this try{ ... fail() }catch(Exception e) { } Clean up tests that expect an exception --- Key: HBASE-11628 URL: https://issues.apache.org/jira/browse/HBASE-11628 Project: HBase Issue Type: Sub-task Components: test Reporter: Sean Busbey Priority: Trivial Labels: newbie We have a few tests that look for expected exceptions by manually catching and explicitly failing in case no exception happens. Places that need to be fixed can be found by running: {code} $ grep -rie [^n]expected *exception `find . -name test -path '*/src/*' -type d | xargs` {code} (there are some false positives, e.g. TestIPv6NIOServerSocketChannel) We should clean these up to use [JUnit's expected arg to the Test annotation|http://junit.org/javadoc/4.11/org/junit/Test.html#expected()]. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11628) Clean up tests that expect an exception
[ https://issues.apache.org/jira/browse/HBASE-11628?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14082021#comment-14082021 ] Sean Busbey commented on HBASE-11628: - It depends on the code. While there are some that can't be updated, in some cases we just have clean up code which can still be done in a finally block, or an After annotation. In some other cases we're combining a failure test and a non-failure test and we could refactor those into individual tests. Clean up tests that expect an exception --- Key: HBASE-11628 URL: https://issues.apache.org/jira/browse/HBASE-11628 Project: HBase Issue Type: Sub-task Components: test Reporter: Sean Busbey Priority: Trivial Labels: newbie We have a few tests that look for expected exceptions by manually catching and explicitly failing in case no exception happens. Places that need to be fixed can be found by running: {code} $ grep -rie [^n]expected *exception `find . -name test -path '*/src/*' -type d | xargs` {code} (there are some false positives, e.g. TestIPv6NIOServerSocketChannel) We should clean these up to use [JUnit's expected arg to the Test annotation|http://junit.org/javadoc/4.11/org/junit/Test.html#expected()]. -- This message was sent by Atlassian JIRA (v6.2#6252)