Refactor selectHost in Sched

Remove the unnecessary return error and add a test for selectHost.