You could set the `replicationWindowSize` to `logRecords.size`. This would ensure that all tx are replicated to the slave and remove the sleep.

After all the tx are acknowledged and before your verification ensure the master do not push more tx with this:
`verifyNoMoreInteractionsAfter(wait = 100, mockSlaveReplicateTxAction)`