Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] build failures with eclipse 3.6M4


Laurent, the eclipse test framework was changed to support JUnit 4 in 3.6M4.  This was announced to the cross project list

See
http://dev.eclipse.org/mhonarc/lists/mdt.dev/msg00462.html

and

http://wiki.eclipse.org/Eclipse/Testing/JUnit4_Changes

Kim




Laurent Goubet <laurent.goubet@xxxxxxx>
Sent by: cross-project-issues-dev-bounces@xxxxxxxxxxx

12/15/2009 06:22 AM

Please respond to
laurent.goubet@xxxxxxx; Please respond to
Cross project issues <cross-project-issues-dev@xxxxxxxxxxx>

To
cross-project-issues-dev@xxxxxxxxxxx
cc
Subject
[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
_______________________________________________
cross-project-issues-dev mailing list
cross-project-issues-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cross-project-issues-dev

Attachment: laurent_goubet.vcf
Description: Binary data


Back to the top