Hi Kavindu, On Wed, Jun 14, 2017 at 12:34 PM, Kavindu Zoysa <[email protected]> wrote:
> Hi all, > > I am trying to use a micro service in a test scenario and I need to > programmatically start and stop the micro services server. Currently I am > using a shell script to start the server with standard java commands and in > order to obtain the database connections, I am using a docker container > with mysql installed in the test environment. With this approach, need to > figure out a way to stop the micro services server. > May be we can use the Microservices Runner to do this programmatically: https://github.com/wso2/msf4j/blob/master/core/src/test/java/org/wso2/msf4j/HttpServerTest.java#L122 https://github.com/wso2/msf4j/blob/master/core/src/test/java/org/wso2/msf4j/HttpServerTest.java#L131 Thanks Imesh > One approach is to write a command to take the process id and save it on a > text file and use that process id to kill the process using java. Another > approach is to use bash commands to kill the process using a shell script. > > it will be great to have feedback on which approach to use. > > Thank you, > Regards, > kavindu. > > > -- > Kavindu Gimhan Zoysa > Software Engineer | WSO2 > > Email : [email protected] > Mobile : +94710630867 <+94%2071%20063%200867> > Web : http://wso2.com > > <http://goog_1771359894> > <https://wso2.com/signature> > -- *Imesh Gunaratne* WSO2 Inc: http://wso2.com T: +94 11 214 5345 M: +94 77 374 2057 W: https://medium.com/@imesh TW: @imesh lean. enterprise. middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
