Forum Discussion

seanlon11's avatar
seanlon11
Occasional Contributor
17 years ago

Automated stop of Mock Service

Does anyone know when the functionality to stop a Mock Service programmatically (outside of the console) will be available? 

My objective is to kick off a Mock Service via my ant task (which I have already developed) and then have the service automatically shutdown after the tests are run.  Whether that is accomplished in the code, or by another ant task or whatever, I don't know, nor does it matter at this point.  I just need to be able to do it outside of the console.

This topic was discussed a little bit a while back, but no definite release date was given for this functionality: http://www.eviware.com/forums/index.php?topic=1011.0

Any suggestions?

Thanks,
    Sean 

2 Replies

  • Hi Sean,

    sorry.. we didn't get around to this in the 3.0 release.. hmm.. maybe the easiest is the same as suggested initially; create an onRequest script that terminates the running mockservice on a special request.. should I create a sample for you?

    regards!

    /Ole
    eviware.com
  • seanlon11's avatar
    seanlon11
    Occasional Contributor
    Yes, a sample would be much appreciated. 

    The other thoughts I had were to create the service within my Java class, and wrap the service within a thread.  I then give that thread a time-to-live, which is configurable.  Or keep track of the thread ID somehow, and then kill it as needed.

    FYI - I don't like either of my solutions.

    I look forward to seeing your example.

    Thanks,
        Sean