5

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?

  • Were you able to resolve this? Also, have you checked this link http://stackoverflow.com/questions/4601745/why-is-jetty-hanging-when-i-try-to-start-it-in-debug-mode?rq=1 – Abhishek Asthana Sep 05 '13 at 14:55

1 Answers1

0

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

OliverLJ
  • 41
  • 4