Uh oh!
There was an error while loading. Please reload this page.
SPARK-6338 [CORE] Use standard temp dir mechanisms in tests to avoid orphaned temp files - #5029
SPARK-6338 [CORE] Use standard temp dir mechanisms in tests to avoid orphaned temp files#5029srowen wants to merge 4 commits into
Conversation
SparkQA
commented
Mar 14, 2015
Test build #28614 has started for PR 5029 at commit
|
SparkQA
commented
Mar 14, 2015
Test build #28614 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 14, 2015
Test FAILed. |
SparkQA
commented
Mar 15, 2015
Test build #28629 has started for PR 5029 at commit
|
SparkQA
commented
Mar 15, 2015
Test build #28629 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 15, 2015
Test PASSed. |
…in some tests, to further ensure they are cleaned up, and simplify
SparkQA
commented
Mar 16, 2015
Test build #28647 has started for PR 5029 at commit
|
SparkQA
commented
Mar 16, 2015
Test build #28647 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 16, 2015
Test PASSed. |
sryza
commented
Mar 16, 2015
What's the advantage of a parent directory created with |
srowen
commented
Mar 16, 2015
|
There was a problem hiding this comment.
Is this necessary now that we're using createTempDir?
sryza
commented
Mar 16, 2015
It seems like in many places we're explicitly deleting the files in addition to using |
There was a problem hiding this comment.
I'm torn on this, since it leaves temp files lying around while tests run, and, doesn't delete them if there's a hard crash. But the extra line of code is annoying everywhere and not done consistently. Hm.. Maybe the test superclass can manage a temp dir and delete it between tests. If anyone's interested in that, I'll go there. Otherwise maybe best to leave it as-is and not add recursive deletes where there were none before.
(A few of these changes are to make the temp file go in a temp dir instead of working dir, but most are indeed just about standardization and better guaranteeing cleanup)
There was a problem hiding this comment.
I was going to suggest a "TempDirectory" trait or something to manage a temp dir per test. If scalatest runs a single JVM for all tests, then it might be worth it, but it would be a very noisy change.
srowen
commented
Mar 16, 2015
True, there is not much consistency in whether it is also deleted explicitly after the test. I think I was mostly keeping that as it was in each case |
vanzin
commented
Mar 16, 2015
LGTM (btw you're my hero). |
srowen
commented
Mar 17, 2015
OK, I basically left the code as-is with respect to recursive deletion. Yeah adding a new trait to every test might be too much for the moment. I think this zaps a few minor actual problems (stray temp files) and helps clean up more stuff in more cases, and that leaves us with little practical problem. |
SparkQA
commented
Mar 17, 2015
Test build #28718 has started for PR 5029 at commit
|
SparkQA
commented
Mar 17, 2015
Test build #28718 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 17, 2015
Test PASSed. |
marmbrus
commented
Mar 18, 2015
SQL changes LGTM. I'll note that at the top of |
srowen
commented
Mar 18, 2015
Let me see if I can also refactor that bit of code in |
SparkQA
commented
Mar 19, 2015
Test build #28871 has started for PR 5029 at commit
|
SparkQA
commented
Mar 19, 2015
Test build #28871 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 19, 2015
Test FAILed. |
SparkQA
commented
Mar 19, 2015
Test build #28884 has started for PR 5029 at commit
|
SparkQA
commented
Mar 19, 2015
Test build #28884 has finished for PR 5029 at commit
|
AmplabJenkins
commented
Mar 19, 2015
Test PASSed. |
Use
Utils.createTempDir()to replace other temp file mechanisms used in some tests, to further ensure they are cleaned up, and simplify