| Summary: | [JUnit] Problems with JUnits with multiple versions of same bundle | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | DJ Houghton <dj.houghton> | ||||||||||
| Component: | UI | Assignee: | Martin Aeschlimann <martinae> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | benno.baumgartner, bpasero, markus.kell.r, mlists | ||||||||||
| Version: | 3.3 | Flags: | markus.kell.r:
review+
martinae: review+ |
||||||||||
| Target Milestone: | 3.3 RC1 | ||||||||||||
| Hardware: | PC | ||||||||||||
| OS: | Windows XP | ||||||||||||
| Whiteboard: | |||||||||||||
| Bug Depends on: | |||||||||||||
| Bug Blocks: | 153429, 179449, 186369 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
DJ Houghton
Created attachment 61024 [details]
3 junit plug-ins
Delete the Junit plug-ins from an Eclipse SDK and then use the ones in this zip.
(I used i20070313)
Part of these errors are from something that I had in the setup of my workspace. I will investigate further next week. Created attachment 66684 [details]
patch
This patch fixes the JUnit classpath container to not be confused when there is a 'org.junit' plug-in around that has a >=4.0 version ('org.junit[4.3]') (It will still use (org.junit4))
From what I tested it is now no problem to have org.junit[4.3] around; the runner works with normal JUnit tests and JUnit Plug-in test.
However, clients plug-ins must not _use_ org.junit[4.3], as our remote junit runner has a plug-in dependency on org.junit4. I they do, we end up with two incompatible instances of the same classes.
I don't know how to solve that. Somehow we would like to avoid the hardcoded reference of org.junit4 from junit4.runtime, but a.) its in the manifest which we can't modify, b.) we would have to know what the client used for his tests.
We could change from plug-in dependencies to imported packages. But then we still run into problems when two plug-in offer the same packages.
An other important discussion point is: the release of the new org.junit[4.3] will 'break' all test plug-ins that use org.junit but never bothered to add version constraints. Unfortunately, JUnit 4 is not 100% backward compatible with JUnit 3.
Maybe org.junit4 could depend on org.junit[4.3] and reexport all its content. Maybe this solves the problem of having two instances of the same classes around. Released patch with a few tweaks, reviewed by Martin. Sorry, have to revert, this leads to test failures in JUnit4TestFinderTests. Will attach a patch of what I've released. Created attachment 66925 [details]
revert
Created attachment 67026 [details]
updated patch
Benno, can you review? I tested the patch on the build machine. Patch is good patch released > 20070514 Verified in I20070527-0010 |