Comment #5 on issue 3230 by
rakesh.d...@gmail.com: selenium hub not getting
No i don't have any issue to make this a defect instead of enhancement.
Thats alright. i just wanted to understand why it is moved to enhancement.
Got the answer. currently i have implemented this using ant target. i
searched for java thread and kill that using kill on linux. but as per me
this is not a graceful shutdown.
=================
<target name="stop-hub">
<property environment="env"/>
<exec executable="${env.JAVA_HOME}/bin/jps" output="pid.out.file">
<arg value="-m"/>
</exec>
<loadfile srcfile="pid.out.file" property="pid.out">
<filterchain>
<linecontains>
<contains value="agent.json"/>
</linecontains>
<replaceregex pattern="2.15.0" replace="world"/>
<replaceregex pattern="-role" replace="abc"/>
<replaceregex pattern="hub" replace="abc"/>
<replaceregex pattern="-hubConfig" replace="abc"/>
<replaceregex pattern="hub.json" replace="abc"/>
<tokenfilter>
<deletecharacters chars='selenium-server-standalone-world.jar'/>
<deletecharacters chars='abc'/>
<trim/>
<!--ignoreblank/-->
</tokenfilter>
<striplinebreaks/>
</filterchain>
</loadfile>
<echo>Killing Selenium hub java process with PID - "${pid.out}"</echo>
<exec executable="kill">
<arg value="-9"/>
<arg value="${pid.out}"/>
</exec>
<delete file="pid.out.file"/>
</target>
========================