properly shut down processes in tests as part of cleanup
simplify AgentLauncher