Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 73547 invoked from network); 6 Mar 2005 10:58:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 6 Mar 2005 10:58:56 -0000 Received: (qmail 69836 invoked by uid 500); 6 Mar 2005 10:58:54 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 69807 invoked by uid 500); 6 Mar 2005 10:58:54 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 69793 invoked by uid 99); 6 Mar 2005 10:58:54 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from mta206-rme.xtra.co.nz (HELO mta206-rme.xtra.co.nz) (210.86.15.58) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 06 Mar 2005 02:58:52 -0800 Received: from pop2-rme.xtra.co.nz ([210.86.15.240]) by mta206-rme.xtra.co.nz with ESMTP id <20050306105849.QFIM2171.mta206-rme.xtra.co.nz@pop2-rme.xtra.co.nz> for ; Sun, 6 Mar 2005 23:58:49 +1300 Received: from [10.1.1.9] ([222.153.105.227]) by pop2-rme.xtra.co.nz with ESMTP id <20050306105849.YMXV16943.pop2-rme.xtra.co.nz@[10.1.1.9]> for ; Sun, 6 Mar 2005 23:58:49 +1300 Subject: [beanutils] patch for test case failures under maven From: Simon Kitching Reply-To: skitching@apache.org To: commons-dev@jakarta.apache.org Content-Type: text/plain Date: Sun, 06 Mar 2005 23:58:47 +1300 Message-Id: <1110106727.32444.11.camel@blackbox> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, I have found that running "maven test" for beanutils reports a failure of 3 test cases. (a) BeanificationTestCase and LocaleBeanificationTestCase both fail to load a test class using the code: ClassLoader loader = new ClassLoader() {}; Class myClass = loader.loadClass( "org.apache.commons.beanutils.BetaBean"); I believe the problem is that maven runs the unit tests within a custom classloader or somesuch, and so the above code which creates a classloader whose parent is the *system* classloader can't find the test case classes. Changing the above to: ClassLoader loader = new ClassLoader( this.getClass().getClassLoader()) {}; ... resolves the issue. (b) in the test/.../locale/converters directory, file "BaseLocaleConverterTestCase.java" doesn't actually define any test cases at all; it is just intended as a base class for the other tests to extend. But junit regards it as an error for a TestCase class not to have any tests. Simply adding a dummy test method resolves this. (NB: the alternative would be to rename the class [eg to "BaseLocaleConverterTester"] and then change each class that inherits from it to match the new name which is probably a "purer" solution but much more hassle. Are there any objections to me committing these changes to beanutils? I have also been working on bug# 18294. Are the beanutils maintainers ok with me adding myself to the "developers" list for beanutils and applying the necessary changes for that? Thanks, Simon --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org