Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Re: [master] Change I5828502f: (egit/parallelip-jgit) Change jgit build to be completely manifest first

Hi,
I had a similar experience when writing tests for p2. I ended up using a much simpler web service. My implementation ("chester the test data molester") was written primarily to create a variety of error scenarios - misbehaving behavior from the web server such as badly reported size, odd response codes, garbled data, etc. etc. but it is capable of servicing unmolested data as well :)

Ping me if there is any interest in using "chester" or some variant thereof... It lives in the p2 CVS.

Henrik Lindberg
henrik.lindberg@xxxxxxxxxxxxxx



On Dec 23, 2009, at 12:58 AM, Shawn O. Pearce wrote:

Igor Fedorenko <ifedorenko@xxxxxxxxxxxx> wrote:
Are you able to run the tests from IDE as JUnit *Plug-in* Test?

Nope.  The Plug-in Test can't find any of the test classes:

 Class not found org.eclipse.jgit.lib.AbbreviatedObjectIdTest
java.lang.ClassNotFoundException: org.eclipse.jgit.lib.AbbreviatedObjectIdTest at org .eclipse .osgi .framework .internal.core.BundleLoader.findClassInternal(BundleLoader.java:437) at org .eclipse .osgi .framework.internal.core.BundleLoader.findClass(BundleLoader.java:399) at org .eclipse .osgi .framework.internal.core.BundleLoader.findClass(BundleLoader.java:387) at org .eclipse .osgi .internal .baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

There's too much black magic going on here with the build and
test execution.  The #@!*@! class exists.  The JUnit runner knows
its there, it wants to call it, but the E@!** OSGi runtime and all
its fancy class loader bullshit can't find it.


I set out today to write JUnit tests for the smart HTTP support.
Instead of doing that, I've spent the entire E@!**@! day trying
to get Jetty just imported into my CLASSPATH so I can see the damn
classes I need to call.

I realized the dual CLASSPATH configuration between Maven 2.x
and our OSGi MANIFEST.MF was a nightmare, so I tried to do this
change to switch over fully to OSGi format before adding in Jetty.
Only now I can't run any bloody tests.

And Jetty doesn't even publish a P2 repository (but they do publish
a Maven repository), so even if I could run tests, I can't access
their code from within our build process.

So then I rewrote the entire damn build using Apache Felix's
maven-bundle-plugin, which is what Jetty is using to do their
builds.  That seemed to work quite nicely, up until their generated
MANIFEST.MF didn't embed the version number for JSch, because the
upstream Maven repository doesn't have bundle tags in that JAR.


So at this point, I'm too pissed off with our current build process
to care anymore.  I've wasted a day I didn't feel like I had in
the first place.

Smart HTTP support in JGit can either be accepted without JUnit
tests, or I'll circle back in a few months and write JUnit tests
after someone else sorts out this build bullshit.  Because it isn't
going to be me.

--
Shawn.
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev



Back to the top