diff --git a/topologytest/multi_actor_conflict_test.go b/topologytest/multi_actor_conflict_test.go index f8eb7a72b9..bb25b9d4a5 100644 --- a/topologytest/multi_actor_conflict_test.go +++ b/topologytest/multi_actor_conflict_test.go @@ -37,6 +37,43 @@ func TestMultiActorConflictCreate(t *testing.T) { } } +// TestMultiActorConflictUpdate +// 1. create document on each peer with different contents +// 2. start replications +// 3. wait for documents to exist with hlv sources equal to the number of active peers +// 4. stop replications +// 5. update documents on all peers +// 6. start replications +// 7. assert that the documents are deleted on all peers and have hlv sources equal to the number of active peers +func TestMultiActorConflictUpdate(t *testing.T) { + if !base.UnitTestUrlIsWalrus() { + t.Skip("Flakey failures on multi actor conflicting writes, CBG-4379") + } + for _, tc := range getMultiActorTestCases() { + if strings.Contains(tc.description(), "CBL") { + // Test case flakes given the WaitForDocVersion function only waits for a docID on the cbl peer. We need to be + // able to wait for a specific version to arrive over pull replication + t.Skip("We need to be able to wait for a specific version to arrive over pull replication + unexpected body in proposeChanges: [304] issue, CBG-4257") + } + t.Run(tc.description(), func(t *testing.T) { + peers, replications := setupTests(t, tc.topology) + replications.Stop() + + docID := getDocID(t) + docVersion := createConflictingDocs(t, tc, peers, docID) + + replications.Start() + waitForVersionAndBody(t, tc, peers, docID, docVersion) + + replications.Stop() + + docVersion = updateConflictingDocs(t, tc, peers, docID) + replications.Start() + waitForVersionAndBody(t, tc, peers, docID, docVersion) + }) + } +} + // TestMultiActorConflictDelete // 1. create document on each peer with different contents // 2. start replications