add PriorityScheduler test case and minor bug fix