Test: check that replication partial sync works if we break the link.

The test checks both successful syncs and unsuccessful ones by changing
the backlog size.