Skip to content

Commit

Permalink
add missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
torcolvin committed Dec 11, 2024
1 parent 746876d commit 379a0f2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions topologytest/multi_actor_conflict_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 379a0f2

Please sign in to comment.