SoapUI jetty thread still hangs after MockService has stopped [SoapUI API]

I am using SoapUI 4.0 and I am running my mockservices through the 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();
}

MockServices start off well, but when I try to demolish them, the stream in which the pier works is still hanging, and my process does not end there.

I tried to stop it using MockRunner.stop (), but the thread still does not stop.

Is there any way to stop the jetty flow to complete my process?

+5
source share
1 answer

I know better late than never.

In the SoapUi 5.xx file in the settings file, set

con: setting id = "HttpSettings @leave_mockengine to false!

java, , , :)

0

All Articles