Make this test more robust to fix intermittent jenkins errors