You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2016/01/22 21:14:39 UTC

[jira] [Reopened] (REEF-1125) Enable TestClassLoaders

     [ https://issues.apache.org/jira/browse/REEF-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun reopened REEF-1125:
---------------------------------

This testsuite should pass with `mvn clean test`, too.

> Enable TestClassLoaders
> -----------------------
>
>                 Key: REEF-1125
>                 URL: https://issues.apache.org/jira/browse/REEF-1125
>             Project: REEF
>          Issue Type: Improvement
>          Components: Tang
>            Reporter: Dongjoon Hyun
>            Assignee: Dongjoon Hyun
>            Priority: Trivial
>             Fix For: 0.14
>
>
> 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`.
> {code}
> +  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");
> -
>    }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)