@@ -39,7 +39,7 @@ func TestRevisionTree(t *testing.T) {
3939 t .Skipf ("Not a single" )
4040 }
4141 c := createClientFromEnv (t , true )
42- skipBelowVersion (c , "3.7 " , t )
42+ skipBelowVersion (c , "3.8 " , t )
4343
4444 db := ensureDatabase (nil , c , "revision_tree" , nil , t )
4545 col := ensureCollection (nil , db , "revision_tree" , nil , t )
@@ -79,15 +79,19 @@ func TestRevisionTree(t *testing.T) {
7979 require .NotEmpty (t , tree .Version )
8080 require .NotEmpty (t , tree .RangeMin )
8181 require .NotEmpty (t , tree .RangeMax )
82+ require .NotEmpty (t , tree .InitialRangeMin )
8283 require .NotEmpty (t , tree .Nodes )
8384
8485 branchFactor := 8
8586 noOfLeavesOnLevel := 1
8687 noOfLeaves := noOfLeavesOnLevel
8788 for i := 1 ; i <= tree .MaxDepth ; i ++ {
8889 noOfLeavesOnLevel *= branchFactor
89- noOfLeaves += noOfLeavesOnLevel
90+ if i == tree .MaxDepth {
91+ noOfLeaves = noOfLeavesOnLevel
92+ }
9093 }
94+ require .Equalf (t , noOfDocuments , int (tree .Count ), "Count value of tree is not correct" )
9195 require .Equalf (t , noOfLeaves , len (tree .Nodes ), "Number of leaves in the revision tree is not correct" )
9296
9397 getRanges := func () driver.Revisions {
0 commit comments