On Thu, Feb 18, 2010 at 4:50 PM, Felix Meschberger <fmesc...@gmail.com>wrote:

> Hi,
>
> On 18.02.2010 19:39, Justin Edelson wrote:
> > On 2/18/10 12:31 PM, Andreas Schaefer wrote:
> >> Hi Justin
> >>
> >> Sorry, forgot to read the failsave plugin documentation first.
> >>
> >> That said I see that the 'sling home directory' is created in the
> project's base directory even though in the Jetty configuration it is set to
> 'target/sling'. In my project I configured the 'maven-clean-plugin' to clean
> up that directory as well but it still feels wrong to have to do that.
> >>
> >> Does anybody know how to set the sling home directory for the
> integration test so that I will end up in the 'target' directory ?
> >>
> >
> > Hmmm. The launchpad.testing module is configured to set the system
> > property sling.home, but this is ignored. In a webapp, you have to
> > configure sling.home via an init-param. I just committed a change to the
> > sample app in r911513[1] to use an init-param in jetty (when using mvn
> > jetty:run-war), but I don't see a way to do this with cargo.
> >
> > It seems like a system property should be usable here. I know there are
> > concerns about system properties in webapps in general, but this seems
> > like a good case for allowing the use of one (although init-param should
> > take precedence).
> >
> > WDYT?
>
> System properties can be used in the web app case, too, but it is
> disabled by default.
>
> The main problem is, that we might have multiple sling web applications
> installed in a single servlet container and we want to prevent them to
> all use the same sling.home value.
>
> How about if sling.home is read from a system property, it get the servlet
context path appended to it?


> So I am worried to read system properties in the war case.
>
> In fact, we should fix the integration launching to use the standalone
> sling instead of the sling web app with cargo.

Well, we *really* should be running the integration tests against
standalone, webapp, and karaf. But I haven't looked at how to best do this.

Justin


>
> Regards
> Felix
>
> >
> > Justin
> >
> > [1] http://svn.apache.org/viewvc?rev=911513&view=rev
> >
> >
> >> Thanks - Andy
> >>
> >> On Feb 17, 2010, at 11:48 AM, Justin Edelson wrote:
> >>
> >>> There is a way to do this with surefire configuration, but it's easier
> >>> to go along with the surefire/failsafe conventions:
> >>>
> >>> Unit Tests end in Test
> >>> Integration Tests end in IT
> >>>
> >>> Justin
> >>>
> >>> On Feb 17, 2010, at 11:59 AM, Andreas Schaefer <schaef...@me.com>
> wrote:
> >>>
> >>>> Hi Justin
> >>>>
> >>>> Thanks for that. It works perfectly in my project as well now. The
> >>>> only thing I want to mention is that one MUST NOT add the suffix
> >>>> 'Test' to the test classes in order to avoid that the tests are
> >>>> executed.
> >>>>
> >>>> I will try later to see if I can exclude the tests from running by
> >>>> default.
> >>
> >
> >
>

Reply via email to