Soumya
Soumya

Reputation: 1054

Mule FunctionalTestCase - does it load mule server for every test?

I am wondering, If I have say 10 tests, each extending FunctionalTestCase in Mule - does it actually load a Mule server in the life cycle of the test and tears it down for every test it runs? That seems to be an overhead to me - however lightweight Mule may be.

FYI - I all my Tests extend an AbstractMuleTest which in turn extends FunctionalTestCase and implements the getConfigResoures() method.

Upvotes: 2

Views: 507

Answers (1)

David Dossot
David Dossot

Reputation: 33413

Yes it does and for a reason: to guarantee that each test is isolated from the others thus that things don't work just because something else happened before in Mule in another test.

This said, you can turn this feature off by adding the following in your test case class constructor:

setDisposeContextPerClass(true);

Upvotes: 4

Related Questions