Fix test flakes; dict keys sorted
Merge pull request #1120 from chinasaur/flaky_test_dict_keys

Fix test flakes; dict keys sorted