You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oozie.apache.org by "Andras Salamon (JIRA)" <ji...@apache.org> on 2018/12/06 14:45:00 UTC

[jira] [Created] (OOZIE-3399) Eliminate nested class in TestV1JobsServletBundleEngine and TestV1JobServletBundleEngine

Andras Salamon created OOZIE-3399:
-------------------------------------

             Summary: Eliminate nested class in TestV1JobsServletBundleEngine and TestV1JobServletBundleEngine
                 Key: OOZIE-3399
                 URL: https://issues.apache.org/jira/browse/OOZIE-3399
             Project: Oozie
          Issue Type: Improvement
          Components: tests
    Affects Versions: trunk
            Reporter: Andras Salamon
            Assignee: Andras Salamon
             Fix For: 5.2.0


There is a useless nested class in {{TestV1JobsServletBundleEngine}} and {{TestV1JobServletBundleEngine}}:
{noformat}
/**
     * This class is needed in order to reuse some methods of class {@link XDataTestCase}. We cannot directly extend it there as
     * we extend {@link DagServletTestCase}. Anonymous inner class is also not an option since we cannot assign it an annotation.
     * The @Ignore annotation is needed to prevent JUnit from recognizing this inner class as a test.
     */
    @Ignore
    private static class XDataTestCase1 extends XDataTestCase {
    }
{noformat}
The comment is no longer relevant, the classes extend {{DagServletTestCase}} which extends {{XDataTestCase}}, no need for the nested class.

I'm not able to reproduce it, but I find more than suspicious that different tests fail in the precommit unit tests right after the unit test runs (and ignores) the {{XDataTestCase1}} nested class. Maybe the double initialization of {{XDataTestCase}} causes some problems:

[https://builds.apache.org/job/PreCommit-OOZIE-Build/938/consoleFull]
 [https://builds.apache.org/job/PreCommit-OOZIE-Build/940/consoleFull]
 [https://builds.apache.org/job/PreCommit-OOZIE-Build/941/consoleFull]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)