* replication-memleak-testcase: make it more robust;