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
- links to