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

Ostap commented on OOZIE-1701:
------------------------------

I'm setting 'TESTING' variable at the beginning of the class TextXTestCase.
Value of this variable is changing in setUp() and tearDown() methods.

package org.apache.oozie.test;

import junit.framework.TestCase;

public class TestXTestCase extends TestCase {
    static boolean TESTING = false;
    static String SYS_PROP = "oozie.test.testProp";
    static String testBaseDir;

    protected void setUp() throws Exception {
        super.setUp();
        testBaseDir = null;
        TESTING = true;
    }

    protected void tearDown() throws Exception {
        TESTING = false;
        super.tearDown();
    }

> TestXTestCase#testWaitFor and TestXTestCase#testBaseDir have the errors
> -----------------------------------------------------------------------
>
>                 Key: OOZIE-1701
>                 URL: https://issues.apache.org/jira/browse/OOZIE-1701
>             Project: Oozie
>          Issue Type: Bug
>    Affects Versions: trunk
>            Reporter: Ostap
>            Assignee: Ostap
>             Fix For: trunk
>
>         Attachments: OOZIE-1701.patch
>
>
> TestXTestCase have the methods testBaseDir and testWaitFor.
> TestXTestCase has the inner class MyXTestCase as well that have the same 
> methods with the same name.
> The problem is that Junit runs tests and creates the directory for inner 
> class before the time when the actual tests would be running.
> As a result we have the following errors:" 
> testWaitFor(org.apache.oozie.test.TestXTestCase): could not delete path 
> [oozie-monarch\core\target\test-data\oozietests\org.apache.oozie.test.TestXTestCase$MyXTestCase\testWaitFor\conf\oozie-site.xml]
>  testBaseDir(org.apache.oozie.test.TestXTestCase): could not delete path 
> [oozie-monarch\core\target\test-data\oozietests\org.apache.oozie.test.TestXTestCase$MyXTestCase\testBaseDir\conf\oozie-site.xml]"
> That is why we need to add the check for setUp and tearDown methods as for 
> the other
> This errors  appear in Windows



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to