In a few places now in MRUnit we're creating temp files / directories as
part of testing (e.g. dist cache testing, MockMapredOutputFormat).

These will obviously need to be cleaned up as part of the test execution.
But, from experience I've found deleting files/folders from Java to be
pretty unreliable (especially if folders are not empty), so usually I'd use
commons-io FileUtils.forceDelete() to get the job done.

I'd really like to be able to use this method in MRUnit, but adding a new
dependency to the POM for one method just seems.... wrong.

I don't know what's worse. Adding the dependency, or re-implementing some
file deletion code that's already been done "properly" elsewhere.

What's your opinion?

Thanks,
Dave

Reply via email to