nickva commented on code in PR #5603:
URL: https://github.com/apache/couchdb/pull/5603#discussion_r2223956329


##########
src/chttpd/test/eunit/chttpd_changes_test.erl:
##########
@@ -493,6 +495,93 @@ t_docs_id_filter_over_limit({_, DbUrl}) ->
         Rows
     ).
 
+t_time_since({_, DbUrl}) ->
+    % Far into the future, we should get nothing
+    Params1 = "?since=3000-02-03T04:05:00Z",
+    {Seq1, Pending1, Rows1} = changes(DbUrl, Params1),
+    ?assertEqual(8, Seq1),
+    ?assertEqual(0, Pending1),
+    ?assertEqual([], Rows1),
+
+    % Before the feature is released, should same as since=0
+    Params2 = "?since=2025-01-01T04:05:00Z",
+    Res2 = {Seq2, Pending2, Rows2} = changes(DbUrl, Params2),
+    ?assertEqual(8, Seq2),
+    ?assertEqual(0, Pending2),
+    ?assertEqual(
+        [
+            {6, {?DOC1, <<"2-c">>}, ?LEAFREV},
+            {7, {?DOC3, <<"2-b">>}, ?DELETED},
+            {8, {?DDOC2, <<"2-c">>}, ?LEAFREV}
+        ],
+        Rows2
+    ),
+    % Verify we're getting the same resulta as since=0

Review Comment:
   Updated



##########
src/couch/src/couch_bt_engine_header.erl:
##########
@@ -478,4 +499,13 @@ get_epochs_from_old_header_test() ->
     Vsn5Header = mk_header(5),
     ?assertEqual(undefined, epochs(Vsn5Header)).
 
+upgrade_time_seq_test() ->
+    Header = mk_header(8),
+    ?assert(couch_time_seq:check(time_seq(Header))),
+    % time_seq's field was reused from an old field whichj was set to 0 so

Review Comment:
   Updated. Thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to