After I run the phatomjs/java integration tests on the build server , the phantomjs processes still keep running in the background and have to be killed manually.
Is there a way to do this in the java code? I am already using driver.quit() in the test cleanup part. Is there anything else also to be included?
The simplest way (not necessarily the formal way) to deal with this issue is to shoot a kill command from bash script that terminates all phantomjs processes:
ps -ef | grep phantomjs | awk '{print $2}' | xargs sudo kill -9
The above script run in terminal will kill all background phantomjs whether you have started them using java or python or ruby... A quick workaround till the actual bug gets solved, imo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With