[rfc][icedtea-web] dont expect junit have hamcrest included
Andrew Azores
aazores at redhat.com
Wed Jan 28 17:31:44 UTC 2015
On 01/26/2015 06:11 AM, Jiri Vanek wrote:
> Hi!
>
> I noticed an issue during build for fedora rawhide [1]
>
> Omair later investigated it, and found:
> "> Could it be that the junit version in rawhide is not compatible with
> > your junit-runner sources somehow?
>
> I tried removing the junit-runner but the errors persisted.
>
> It turns out that this is caused by a change in Fedora's junit.jar. In
> F20 (at least) the junit.jar includes org.hamcrest.* classes. This is no
> longer true for the version in rawhide (this matches the jar shipped by
> upstream in maven repositories). Since the hamcrest classes are not
> available on the classpath, a class that imports them, such as
> org/junit/internal/AssumptionViolatedException, fails to load with a
> NoClassDefFoundError.
>
> The fix is to make sure that the hamcrest jar is available on the
> classpath next to junit.jar too. The attached patch (for icedtea-web)
> does that and works on my machine with an upstream junit 4.12 jar.
>
> A scratch build with this patch applied is able to run the unit tests:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=8711128"
>
>
> I'm attaching his patch here. Form my point of view is ok to push. Both
> head and 1.5
>
> Any other ideas?
>
> Omair, Thank you!
>
>
> J.
Aha! This would be why I have never been able to get the ITW tests
working on my laptops - my JUnit doesn't include Hamcrest.
+1 for fixing this, +0 for quality of this patch (I don't know enough
about distro development, packaging, etc. to judge :) )
Thanks,
--
Andrew Azores
More information about the distro-pkg-dev
mailing list