Refactor DriverRunner and DriverRunnerTest

Convenient for testing, especially in timeout scenario.