Skip to content

Commit

Permalink
Fixed some broken test code
Browse files Browse the repository at this point in the history
c4doc_getRevisionHistory requires doc be loaded with kDocGetAll.
VectorDoc correctly threw an exception on this.
Also, all this is doing is checking the current rev, so no need to
get the history.
  • Loading branch information
snej committed Sep 11, 2024
1 parent d3d60fd commit 6b624ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Replicator/tests/ReplicatorCollectionTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,7 @@ TEST_CASE_METHOD(ReplicatorCollectionTest, "Multiple Collections Incremental Rev
for ( const auto& coll_doc : docsWithIncrementalRevisions ) {
c4::ref<C4Document> doc = c4coll_getDoc(coll_doc.first, coll_doc.second, true, kDocGetMetadata, ERROR_INFO());
CHECK(doc);
alloc_slice hist = c4doc_getRevisionHistory(doc, 1, nullptr, 0);
if ( isRevTrees() ) CHECK(3 == c4rev_getGeneration(hist));
if ( doc && isRevTrees() ) CHECK(c4rev_getGeneration(doc->revID) == 3);
}
}

Expand Down

0 comments on commit 6b624ca

Please sign in to comment.