Refactoring to the partition test cases.
Merge remote-tracking branch 'upstream2/master'