Make pagination test more robust

Try a couple of times (up to 5) before failing the test.
This should make this integ test more robust.