Uploaded image for project: 'Oozie'
  1. Oozie
  2. OOZIE-2746

Several tests failure in TestV2ValidateServlet.java

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.0
    • 5.0.0b1
    • tests
    • None

    Description

      I backport JIRA OOZIE-2159 : 'oozie validate' command should be moved server-side in oozie 4.2.0 release, but has several UT failures in TestV2ValidateServlet.
      For example:

      From UT output of TestV2ValidateServlet#testValidateBundle:

      error[E0701], E0701: XML schema error, bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 115; cvc-elt.1: Cannot find the declaration of element 'bundle-app'.
      org.apache.oozie.servlet.XServletException: E0701: XML schema error, bundle.xml, org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 115; cvc-elt.1: Cannot find the declaration of element 'bundle-app'.
      

      If I modify validate(String xml) function in V2ValidateServlet.java from :

      if (!e.getMessage().contains("cvc-elt.1.a"))
      { exception = e; break; }
      

      to:

      if (!e.getMessage().contains("cvc-elt.1"))
      { exception = e; break; }
      

      Then this UT can pass.
      I wonder what is the difference between exception message cvc-elt.1 and cvc-elt.1.a.
      Why cvc-elt.1 is generated from my environment instead of cvc-elt.1.a?
      Thanks very much.

      Attachments

        1. OOZIE-2746-1.patch
          0.8 kB
          Dongying Jiao
        2. OOZIE-2746-2.patch
          2 kB
          Dongying Jiao
        3. OOZIE-2746-3.patch
          2 kB
          Dongying Jiao
        4. OOZIE-2746-4.patch
          2 kB
          Dongying Jiao

        Issue Links

          Activity

            People

              Dongying Jiao Dongying Jiao
              Dongying Jiao Dongying Jiao
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: