[ 
https://issues.apache.org/jira/browse/OOZIE-49?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13099749#comment-13099749
 ] 

Hadoop QA commented on OOZIE-49:
--------------------------------

Here is a patch that implements the second approach:

    $ git diff --no-prefix --cached
    diff --git core/src/test/java/org/apache/oozie/test/XTestCase.java 
core/src/test/java/org/apache/oozie/test/XTestCase.java 
    index 014e581..4f3bb69 100644
    --- core/src/test/java/org/apache/oozie/test/XTestCase.java
    +++ core/src/test/java/org/apache/oozie/test/XTestCase.java
    @@ -153,7 +153,7 @@ public abstract class XTestCase extends TestCase {
         }
 
         protected String getTestUser() {
    -        return "test";
    +        return System.getProperty("user.name", "test");
         }
     
         protected String getTestUser2() {
        diff --git pom.xml pom.xml
        index 75d70c8..f1ab828 100644
    --- pom.xml
    +++ pom.xml
    @@ -219,6 +219,10 @@
                         <argLine>-Xmx512m</argLine>
                         <systemProperties>
                             <property>
    +                            <name>user.name</name>
    +                            <value>${user.name}</value>
    +                        </property>
    +                        <property>
                                 <name>oozie.test.dir</name>
                                 <value>${oozie.test.dir}</value>
                             </property>

> GH-3: The XTestCase.getTestUser() method returns the hardcoded username test. 
> This results in failure due to SSH authentication failure in case this user 
> is not setup correctly.
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OOZIE-49
>                 URL: https://issues.apache.org/jira/browse/OOZIE-49
>             Project: Oozie
>          Issue Type: Bug
>            Reporter: Hadoop QA
>
> One workaround would be to run the tests as test user and have the 
> environment setup correctly for that. The other solution would be to by 
> default use the current user for test purposes, and overwrite that to another 
> user where necessary.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to