On 27/09/2007, Arnaud Simon <[EMAIL PROTECTED]> wrote:
> On Thu, 2007-09-27 at 13:53 +0100, Martin Ritchie wrote:
> > >
> > > ok, I agree with that and I am adding the step of starting/stopping a
> > > remote broker. I am doing it in the client module for now. I would
> > > suggest that we then review those tests and decide together the ones we
> > > want to move into integration Tests.
> >
> > Before you rush in to doing this might be work taking a look at the
> > way the python tests are run against the java broker as part of the
> > build just now. There is the RunBrokerWithCommand class that starts a
> > broker runs an external command then quits
> >
> > It would be very easy to duplicate the pom configuration and simply
> > provide the command 'mvn test broker=localhost:<port>'. All we need is
> > the tests to understand the broker property. Though IIRC this won't
> > exactly work as the current code base will not have been installed
> > until the test cycle has completed.
>
> We need a way of running a new broker instance before a test. For code
> reuse sake I don't want to change all the existing tests and it looks to
> me that the current tests don't do the necessary cleanup as they rely on
> a in_VM broker that is started before each test. So, we need to start
> and stop the broker before and after running a test.
> Moreover, the new tests I am adding are relying on crashing and
> restarting the server. So, we need a way of doing that from within the
> tests and I don't think we can rely on maven for that.

No but we could rely on JUnit. The M2.1 tests all currently start and
stop an inVm broker between each test.

My thoughts were to factor that out to a super class so that the tests
don't have to worry about it. In fact some of the tests didn't kill
the broker after their run causing problems for other tests.  Once
this change has been done it would be very easy to start a local
broker rather than an inVm one.

I'd be happy to look at doing this but I can't guarantee any time
until M2 is completed


-- 
Martin Ritchie

Reply via email to