glassfish
  1. glassfish
  2. GLASSFISH-333

New Assertion: files specified using <mapping-file> element should be available

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 9.0pe
    • Fix Version/s: 9.0pe
    • Component/s: verifier
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      333

      Description

      Similar to com.sun.enterprise.tools.verifier.tests.persistence.JarNotFound, we
      need a test in verifier that checks that mapping-files are resource loadable. A
      way to do it:
      public class MappingFileNotFound extends VerifierTest implements VerifierCheck {
      public Result check(Descriptor descriptor) {
      Result result = getInitializedResult();
      List<String> mappingFileNames = new ArrayList<String>(pu.getMappingFiles());
      for (String mappingFileName : mappingFileNames) {
      if(classLoader.getResource(mappingFileName) == null)

      { result.failed(...); }

      }
      return result;
      }

      1. 333.tar
        190 kB
        Bhavanishankar

        Activity

        Hide
        Bhavanishankar added a comment -

        Code changes:
        =============

        RCS file:
        /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/persistence/MappingFileNotFound.java,v
        done
        Checking in tests/persistence/MappingFileNotFound.java;
        /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/persistence/MappingFileNotFound.java,v
        <-- MappingFileNotFound.java
        initial revision: 1.1
        done
        Checking in tests/AbstractPersistenceContextType.java;
        /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/AbstractPersistenceContextType.java,v
        <-- AbstractPersistenceContextType.java
        new revision: 1.2; previous revision: 1.1
        done
        Checking in tests/appclient/PUTransactionType.java;
        /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/appclient/PUTransactionType.java,v
        <-- PUTransactionType.java
        new revision: 1.2; previous revision: 1.1
        done
        Checking in config/verifier/TestNamesPersistence.xml;
        /cvs/glassfish/avk/config/verifier/TestNamesPersistence.xml,v <--
        TestNamesPersistence.xml
        new revision: 1.4; previous revision: 1.3
        done
        Checking in LocalStrings.properties;
        /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/LocalStrings.properties,v
        <-- LocalStrings.properties
        new revision: 1.68; previous revision: 1.67
        done

        Show
        Bhavanishankar added a comment - Code changes: ============= RCS file: /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/persistence/MappingFileNotFound.java,v done Checking in tests/persistence/MappingFileNotFound.java; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/persistence/MappingFileNotFound.java,v <-- MappingFileNotFound.java initial revision: 1.1 done Checking in tests/AbstractPersistenceContextType.java; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/AbstractPersistenceContextType.java,v <-- AbstractPersistenceContextType.java new revision: 1.2; previous revision: 1.1 done Checking in tests/appclient/PUTransactionType.java; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/tests/appclient/PUTransactionType.java,v <-- PUTransactionType.java new revision: 1.2; previous revision: 1.1 done Checking in config/verifier/TestNamesPersistence.xml; /cvs/glassfish/avk/config/verifier/TestNamesPersistence.xml,v <-- TestNamesPersistence.xml new revision: 1.4; previous revision: 1.3 done Checking in LocalStrings.properties; /cvs/glassfish/avk/src/tools/com/sun/enterprise/tools/verifier/LocalStrings.properties,v <-- LocalStrings.properties new revision: 1.68; previous revision: 1.67 done
        Hide
        Bhavanishankar added a comment -

        Created an attachment (id=114)
        Testcase

        Show
        Bhavanishankar added a comment - Created an attachment (id=114) Testcase

          People

          • Assignee:
            Bhavanishankar
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: