add server exit test code