reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dongjoon Hyun (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (REEF-1125) Enable TestClassLoaders
Date Fri, 22 Jan 2016 20:09:39 GMT

    [ https://issues.apache.org/jira/browse/REEF-1125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15112979#comment-15112979
] 

Dongjoon Hyun commented on REEF-1125:
-------------------------------------

I think `re-open` is proper to this problem. 
I made a fix for this. I'll make a PR very soon.

> 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)

Mime
View raw message