fix intermittent test failure
Merge pull request #5018 from dimagi/test-fix

fix intermittent test failure