make tests more stable
retry connection on replay tests, to prevent them from failing, when e.g. restarting iapi. also sort returned list, to prevent errors due to non-deterministic order.
retry connection on replay tests, to prevent them from failing, when e.g. restarting iapi. also sort returned list, to prevent errors due to non-deterministic order.