Make sure the queue is started before draining.
- Added unit tests for shifting from the initial state.

#1832