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

隐身守侯 提交于 2019-12-14 03:57:07

问题


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.


回答1:


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);


来源:https://stackoverflow.com/questions/13608004/mule-functionaltestcase-does-it-load-mule-server-for-every-test

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!