Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Some unit tests fail after compiling JDT from source code(What needs to be done to make all unit tests succeed?)
Some unit tests fail after compiling JDT from source code [message #1215925] Thu, 28 November 2013 03:48 Go to next message
Eclipse UserFriend
I think I have found a JDT-related bug in an open-source project that ships with JDT core 3.8.1 (org.eclipse.jdt.core-3.8.1.v20120531-0637.jar).

Therefore I would now like to see if I can reproduce the problem with JDT core 3.8.1 compiled from source code (plus then also from the latest code base) before filing a bug (and possibly also submitting a fix). I other words, I would like to get started with JDT development.

To this end I have installed the source code in Eclipse 4.3.1 with Java 1.6 on OS X 10.9 by following instructions in the JDT Core Committer FAQ (plus some extra advise as linked below to account for my recent versions of Eclipse/Java) for the R_3_8_maintainance branch:

* git clone and import projects (with "Search for nested projects" turned off)
* set compiler compliance level to 1.4; set API baseline to Eclipse 3.7.2
* set "No strictly compatible JRE for execution environment available" to "warning" for projects with previous compilation errors as described here kthoms.wordpress.com/2013/05/17/remove-build-path-specifies-execution-environment-warnings-from-problems-view
* install execution environment descriptions as described here wiki.eclipse.org/JDT_Core_Committer_FAQ#How_do_I_create_a_Git_repository_connection.3F

This results in the following lists of projects in my workspace:

* org.eclipse.jdt.compiler.tool
* org.eclipse.jdt.compiler.tool.tests
* org.eclipse.jdt.core
* org.eclipse.jdt.core.tests.binaries
* org.eclipse.jdt.core.tests.builder
* org.eclipse.jdt.core.tests.compiler
* org.eclipse.jdt.core.tests.model
* org.eclipse.jdt.core.tests.performance
* org.eclipse.test.performace

If I now try to run projects which have "tests" as part of their names (except org.eclipse.jdt.core.tests.binaries) as JUnit Plug-In Tests they execute impressively many unit tests (and thus run for impressively long times), but not all of the tests succeed.

The larger fraction succeeds, but too many fail as to post their exact details here. Some failures (but not all) seem to disappear if I run the single test class (not the entire project) as JUnit Plug-In test.

For instance, JavadocTestForMethod.text001 in org.eclipse.jdt.core.tests.compiler fails with IllegalArgumentException (thrown in PerformanceMeterFactory.assertUniqueScenario) when the project is run as a JUnit Plug-In test but succeeds if the class is run as such. PackageInfoTest.test002 in org.eclipse.jdt.core.tests.builder fails with AssertionFailedError ("unexpected output ...") in either case.

Why do these unit tests fail? Have I missed something in the setting up JDT inside my workspace? What is the expected behavior of all the unit tests in the cited projects after a proper JDT setup from source code?

This concerns me also because I understand all tests have to be green before committing a possible fix (either to the R3_8_maintainance or master branches) later on ...
Re: Some unit tests fail after compiling JDT from source code [message #1238645 is a reply to message #1215925] Sat, 01 February 2014 19:41 Go to previous message
Eclipse UserFriend
Skimming through old unread posts, I see this post unanswered.
Have you received an answer via some other channel, or could you solve it yourself?
All what you wrote about your setup looks good to me, so I hope you weren't stuck all the time waiting for an answer ...

Stephan
Previous Topic:Cannot Start Eclipse.exe
Next Topic:[ANN] JXTA development plug-in
Goto Forum:
  


Current Time: Thu Apr 17 19:58:29 EDT 2025

Powered by FUDForum. Page generated in 0.02900 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top