Initial attempt to fix test of sync error handling

Change the test to actually test an error in replication (simulated by an error
from changes).

Fix replicate to call complete in a timely manner after being cancelled cancel.