Fix the shutdown timeout infinite loop bug and also fix the unreliable ordering bug in the instance redeploy command
Created by: lgp171188
This should also remove the unnecessary delays during the unit test runs.
Created by: lgp171188
This should also remove the unnecessary delays during the unit test runs.