[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cross-project-issues-dev] build failures with eclipse 3.6M4
|
Hi all,
We just built EMF Compare 1.1.0M4 today after a good dozen failing build
: when selecting eclipse SDK 3.6M4 as a build dependency, tests simply
refused to launch with the (abbreviated) stack trace :
junit.framework.TestSuite| | at
org.eclipse.test.EclipseTestRunner.getTest(EclipseTestRunner.java:261)
at org.eclipse.test.EclipseTestRunner.<init>(EclipseTestRunner.java:216)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:200)
at
org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
yes, basically, no information.
I downloaded the M4 build along with my other dependencies, checked out
the code of my plugins, tried to launch the tests.... and it failed with
a stack trace :
java.lang.ClassCastException: junit.framework.TestSuite cannot be cast
to junit.framework.Test
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.getTest(JUnit3TestLoader.java:108)
at
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader.loadTests(JUnit3TestLoader.java:59)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
yup, that's better. Now I know that Eclipse is trying to launch my tests
with JUnit 4 instead of JUnit 3. Why? My MANIFEST.MF clearly states :
org.junit;bundle-version="[3.8.1,4.0.0)" which should rule out JUnit4 of
my class path; moreover, I clearly stated "JUnit 3" in the launch config
as the "Test Runner". Using Eclipse 3.6M3, it simply works. If I remove
the version restrictions on JUnit from the manifest, Eclipse understands
that my tests need be run with JUnit 3 and "it works". Is that a
regression of M4 ? Should we avoid version restrictions in the manifest?
have I missed a bugzilla that explained my issue?
Anyway, if anyone has problems running his unit tests with the M4 build,
remove all version restrictions from your MANIFEST.MF and you should be
set, at least it worked for me ;).
Laurent Goubet
Obeo
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr">Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard