[
https://issues.apache.org/jira/browse/HADOOP-16532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17425137#comment-17425137
]
Konstantin Shvachko commented on HADOOP-16532:
----------------------------------------------
Well, Unit tests are hacks by definition. We mock variables and methods, inject
faults, set weird config values, etc., to achieve the desired "faulty" behavior.
You can try using {{setWorkingDirectory()}} is this feels less hacky to you.
> TestViewFsTrash uses home directory of real fs; brittle
> -------------------------------------------------------
>
> Key: HADOOP-16532
> URL: https://issues.apache.org/jira/browse/HADOOP-16532
> Project: Hadoop Common
> Issue Type: Bug
> Components: fs, test
> Affects Versions: 3.3.0
> Reporter: Steve Loughran
> Assignee: Xing Lin
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> the test {{TestViewFsTrash}} uses the .Trash directory under the current
> user's home dir so
> * fails in test setups which block writing to it (jenkins)
> * fails when users have real trash in there
> * may fail if there are parallel test runs.
> the home dir should be under some test path of the build.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]