SoapUI jetty thread still hanging after MockService stopped [SoapUI API]
I'm using SoapUI 4.0 and i'm starting my mockservices via SoapUI API :
public static void startMockServices(String soapuiProject) throws Exception
{
WsdlProject proj = new WsdlProject(soapuiProject);
List<MockService> mockList = proj.getMockServiceList();
for (MockService mockService : mockList) {
mockService.addMockRunListener(new LogListener());
开发者_运维问答 mockService.start();
}
}
public static void finishMocks() {
SoapUI.getThreadPool().shutdown();
try {
SoapUI.getThreadPool().awaitTermination(5l, TimeUnit.SECONDS);
} catch (InterruptedException e) {
e.printStackTrace();
}
SoapUI.shutdown();
}
The MockServices start well, but when I try to tear them down, the thread where jetty is running is still hanging up and my process does not finish.
I've tried to stop it via MockRunner.stop() as well but the thread still does not stop as well.
Is there any way I can stop the jetty thread so that my process finishes?
I know, better late than never.
On SoapUi 5.x.x, in the setting file, set the
con:setting id="HttpSettings@leave_mockengine to false!
In java, after, on the runner, you can set the settings file :)
精彩评论