How to check if WCF services are alive and restart them if needed?
I have a few WCF services that live inside one Windows managed service. These services perform distributed functional testing on several units under test. Quite often Windows on the units goes into blue screen, as the product under test includes driver level. What I want to learn is a way to know if the service is alive (i.e. no BSOD has happened before). If not, I can run a script to start it up. If it is alive I can carry on running functional tests. Generally, the tests are ru开发者_运维技巧nning from TeamCity.
So my questions are
- What is the "standard" approach to "ping" the WCF service?
- Which part of the distributed test harness (or maybe CI) is responsible for restarting services?
- When shall I "ping" the services: before running the tests or repeatedly in a time-interval fashion?
精彩评论