Skip to content

Commit dfd3fd8

Browse files
committed
Change TestRevTreeChannelMapLeafOnly assertion to non-winning leaf only
1 parent 707ce13 commit dfd3fd8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

db/revtree.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type RevInfo struct {
2929
Deleted bool
3030
depth uint32
3131
Body []byte // Used when revision body stored inline (stores bodies)
32-
Channels base.Set // Set only if the revision is a leaf revision (we don't store channel history per-revision)
32+
Channels base.Set // Set only if the revision is a non-winning leaf revision (we don't store channel history per-revision)
3333
HasAttachments bool
3434
}
3535

db/revtree_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ func TestRevTreeCompareRevIDs(t *testing.T) {
344344
assert.Equal(t, 1, compareRevIDs("5-bbb", "1-zzz"))
345345
}
346346

347-
// TestRevTreeChannelMapLeafOnly ensures that only leaf revisions populate channel information from/to channelMap.
347+
// TestRevTreeChannelMapLeafOnly ensures that only non-winning leaf revisions populate channel information from/to channelMap.
348348
func TestRevTreeChannelMapLeafOnly(t *testing.T) {
349349

350350
// Add a 4th revision with channels to supersede rev 3-three
@@ -370,7 +370,7 @@ func TestRevTreeChannelMapLeafOnly(t *testing.T) {
370370
// unmarshal back into revTreeList to ensure non-leaf channels are stripped on marshal for stored format
371371
var storedMap revTreeList
372372
require.NoError(t, base.JSONUnmarshal(bytes, &storedMap))
373-
assert.Len(t, storedMap.ChannelsMap, 2, "expected only two channelsMap entries (for the leaf revisions)")
373+
assert.Len(t, storedMap.ChannelsMap, 1, "expected only one channelsMap entry (for the non-winning leaf revisions)")
374374
}
375375

376376
func TestRevTreeIsLeaf(t *testing.T) {

0 commit comments

Comments
 (0)