On 11/30/06, Tomasz Błachowicz <[EMAIL PROTECTED]> wrote:
Hi,

I've been experiencing a problem when I try to run commons-lang tests using
Maven2. When I run tests within my Eclipse IDE, it works fine. EnumTest.
testColorEnumEqualsWithDifferentClassLoaders fails bacause of the issue with
class loader. The code of this test calls method
ClassUtilsTest.newSystemClassLoader() and there you can find following
snippet of code:

ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
ClassLoader myClassLoader = ClassUtilsTest.class.getClassLoader();
/.../
if (!myClassLoader.equals(systemClassLoader)) {
  fail("Need a better test set up?");
}

The problem while running using Maven's surefire plugin is that
systemClassLoader is of class sun.misc.Launcher$AppClassLoader and
myClassLoader is of class
org.apache.maven.surefire.booter.IsolatedClassLoader and they are not equal.

Do anyone of you have any ideas how to fix that and be able fo run tests
using Maven2?

Nope :( I got the same problems myself when I made the pom.xml. I
figured it was still worth committing even if it doesn't work yet.

Haven't dug heavily into it yet; I've had a little bit of a Lang
vacation to cause trouble in other components :)

Hen

Reply via email to