fix no client in test_client_agent bug