Fix a flaky test by draining the worker pool after syncing.
Merge pull request #2096 from brendandburns/master

Fix a flaky test by draining the worker pool after syncing.