Return-Path: X-Original-To: apmail-reef-dev-archive@minotaur.apache.org Delivered-To: apmail-reef-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 20EA3187B5 for ; Fri, 22 Jan 2016 20:09:40 +0000 (UTC) Received: (qmail 17903 invoked by uid 500); 22 Jan 2016 20:09:40 -0000 Delivered-To: apmail-reef-dev-archive@reef.apache.org Received: (qmail 17864 invoked by uid 500); 22 Jan 2016 20:09:40 -0000 Mailing-List: contact dev-help@reef.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@reef.apache.org Delivered-To: mailing list dev@reef.apache.org Received: (qmail 17638 invoked by uid 99); 22 Jan 2016 20:09:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jan 2016 20:09:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CD58A2C1F58 for ; Fri, 22 Jan 2016 20:09:39 +0000 (UTC) Date: Fri, 22 Jan 2016 20:09:39 +0000 (UTC) From: "Dongjoon Hyun (JIRA)" To: dev@reef.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (REEF-1125) Enable TestClassLoaders MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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)