Skip to content

Commit

Permalink
CBG-1427 Race condition fix (#5251)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacLambat committed Sep 20, 2021
1 parent 7ed7d49 commit 0757c36
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rest/replicator_test.go
Expand Up @@ -5654,7 +5654,7 @@ func TestReplicatorSwitchPurgeNoReset(t *testing.T) {
// CBG-1427 - ISGR should not try sending a delta when deltaSrc is a tombstone
func TestReplicatorDoNotSendDeltaWhenSrcIsTombstone(t *testing.T) {
if !base.IsEnterpriseEdition() {
t.Skipf("Requires EE for some delta sync")
t.Skipf("Requires EE for delta sync")
}
defer db.SuspendSequenceBatching()()
defer base.SetUpTestLogging(base.LevelInfo, base.KeyAll)()
Expand Down Expand Up @@ -5741,6 +5741,10 @@ func TestReplicatorDoNotSendDeltaWhenSrcIsTombstone(t *testing.T) {
// Replicate resurrection to passive
err = passiveRT.waitForRev("test", revID)
assert.NoError(t, err) // If error, problem not fixed

// Shutdown replicator to close out
require.NoError(t, ar.Stop())
activeRT.waitForReplicationStatus(ar.ID, db.ReplicationStateStopped)
}

func getTestRevpos(t *testing.T, doc db.Body, attachmentKey string) (revpos int) {
Expand Down

0 comments on commit 0757c36

Please sign in to comment.