hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HDFS-2967) unit tests which alter persistent state should call cleanup before running
Date Fri, 17 Feb 2012 18:42:02 GMT
unit tests which alter persistent state should call cleanup before running

                 Key: HDFS-2967
                 URL: https://issues.apache.org/jira/browse/HDFS-2967
             Project: Hadoop HDFS
          Issue Type: Bug
            Reporter: Colin Patrick McCabe
            Priority: Minor

I did a little test, and found that aborting unit tests halfway through (for example, with
the stop button in Eclipse) will NOT invoke the @After functions.

Needless to say, this could have bad consequences for test users.  A developer might press
control-C in the middle of a unit test, and then find that he was unable to successfully re-run
that test again because of the lingering state.  A Jenkins build machine might experience
a JVM crash because of an out-of-memory condition, and then find that all builds turned red
because a unit test failed to clean up the state which it created.

I think that in HDFS tests which alter persistent state, we probably should invoke the @After
functions from a @Before function, just to make sure that the necessary cleanup is done.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message