Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] org.junit 4.11 and backward compatibility

Hi all,

Since Kepler M6, the default version of JUnit is 4.11, and implies using hamcrest 1.3. SWTBot depends on Hamcrest 1.1 and JUnit 4.8, and the bad piece of news is that hamcrest 1.3 has some API changes that makes SWTBot failing on Kepler M6. https://bugs.eclipse.org/bugs/show_bug.cgi?id=404346
For SWTBot, we want to keep a 2-release train backward compatibility (ie we want next version to support Kepler, Juno and Indigo).

I'm trying to figure out the best way to deal with this issue:
e tried to change SWTBot code to depend on methods that are in both hamcrest 1.3 and 1.1 => This does not work because SWTBot uses org.hamcrest.library (1.1) which fails with org.hamcrest.core (1.3), so there is still a transitive dependency on org.hamcrest 1.1. So the best way to fix that is "simply" to make SWTBot depend on org.hamcrest.* 1.3 and org.junit 4.11 (mandatory because OSGi won't load org.junit 4.8 and org.hamcrest 1.3 in same bundle classpath). But here comes the question:
Will using org.junit 4.11 and org.hamcrest 1.3 still work with Indigo? If we make a dependency from SWTBot to org.junit 4.11 and org.hamcrest 1.3, then all "test runtimes" will use these versions by default instead of "factory" org.junit 4.8 and org.hamcrest 1.1. Is there a risk of breaking JDT 3.7 with these bundles?

Cheers,

PS: this is a high priority issue for projects that are building against Kepler and using SWTBot for tests.
--
Mickael Istria
Eclipse developer at JBoss, by Red Hat
My blog - My Tweets

Back to the top