Fix flaky scheduler factory test.
Merge pull request #1104 from lavalamp/fix

Fix flaky scheduler factory test.