Implemented some tests to verify DynamoScheduler shutdown sequence
Merge pull request #2907 from Benglin/SchedulerUnitTest

Added unit test cases for scheduler