MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / TestLongestBranch1

Function TestLongestBranch1

db/revtree_test.go:734–752  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

732}
733
734func TestLongestBranch1(t *testing.T) {
735
736 branchSpecs := []BranchSpec{
737 {
738 NumRevs: 60,
739 Digest: "non-winning unresolved",
740 LastRevisionIsTombstone: false,
741 },
742 {
743 NumRevs: 25,
744 Digest: "non-winning tombstoned",
745 LastRevisionIsTombstone: true,
746 },
747 }
748 revTree := getMultiBranchTestRevtree1(base.TestCtx(t), 50, 100, branchSpecs)
749
750 assert.True(t, revTree.LongestBranch() == 150)
751
752}
753
754func TestLongestBranch2(t *testing.T) {
755

Callers

nothing calls this directly

Calls 3

TestCtxFunction · 0.92
LongestBranchMethod · 0.80

Tested by

no test coverage detected