Daniel Barclay (Drill/MapR) created DRILL-1806:
--------------------------------------------------
Summary: Unit test temp. files clutter /tmp directory; interfere
with non-unique pathnames
Key: DRILL-1806
URL: https://issues.apache.org/jira/browse/DRILL-1806
Project: Apache Drill
Issue Type: Bug
Reporter: Daniel Barclay (Drill/MapR)
Priority: Minor
The unit tests write many files and directories as direct children of directory
/tmp and don't delete them. That clutters up /tmp. That also means that the
state of /tmp/... can interfere with the tests.
Also, because of that, many unit tests use file pathnames that are not unique
to each test run. That means that simultaneous test runs can interfere.
Additionally, given that the files are not deleted, that means that a later
test run can be affected by an earlier test run. (Additionally, at least a few
test methods write to the same relative file names, meaning those tests can
interfere with each other.)
Recommendations:
# At least change the parent directory from {{/tmp}} to a subdirectory of
{{/tmp}}.
# Change to a parent directory whose name is unique to the test run (e.g., as
JUnit's {{TemporaryFolder}} rule would create).
# Consider: Normally delete the temporary files after use (as
{{TemporaryFolder}} does), but provide a convenient option to keep the files
(possibly automatically defaulting to keeping in debugging mode).
# Probably use JUnit's {{TemporaryFolder}} rule (to get unique names, to delete
after test). (Investigate how to conditionally disable deleting the files.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)