Uploaded image for project: 'REEF (Retired)'
  1. REEF (Retired)
  2. REEF-1125

Enable TestClassLoaders

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.14
    • Tang
    • None

    Description

      This issue enables 5 Tang test cases in `TestClassLoaders.java` again.
      In addition, those test cases depends on the jar files whose names contain specific version numbers. So, in order to remove the version number dependency, this PR introduces `FilenameFilter`.

      +  private static final FilenameFilter JAR_FILE_FILTER = new FilenameFilter() {
      +    public boolean accept(final File dir, final String name) {
      +      return name.endsWith(".jar");
      +    }
      +  };
      +
      -  //  @Test
      -  public void testOneJar() throws MalformedURLException,
      -      ClassNotFoundException, NameResolutionException, BindException {
      +  @Test
      +  public void testOneJar() throws MalformedURLException, ClassNotFoundException, BindException {
           Tang.Factory
               .getTang()
               .newConfigurationBuilder(
      -            new File("../tang-test-jarA/target/tang-test-jarA-1.0-SNAPSHOT.jar")
      +            new File("../tang-test-jarA/target").listFiles(JAR_FILE_FILTER)[0]
                       .toURI().toURL()).getClassHierarchy().getNode("org.apache.reef.tang.examples.A");
      -
         }
      

      Attachments

        Issue Links

          Activity

            People

              dongjoon Dongjoon Hyun
              dongjoon Dongjoon Hyun
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: