Fix failing test.
Format better message about test failing because of wait_for() call timeing out.
Fixes in the algorithm merging logs of the concurrent document updates.