Skip to content

Commit

Permalink
Fix flaky chttpd_changes_test
Browse files Browse the repository at this point in the history
We made too strong of an assumption there that even in the case of Q=8 we'd
always have 2 pending changes, which is incorrect. The tests on Windows
apprently revealed an error where it returned 0. So let's relax the assumption
to assert that pending would be >= 0 and something less than 7.
  • Loading branch information
nickva committed Jan 26, 2023
1 parent 060f44d commit c2498a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/chttpd/test/eunit/chttpd_changes_test.erl
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ t_design_filter({_, DbUrl}) ->
Params = "?filter=_design",
{Seq, Pending, Rows} = changes(DbUrl, Params),
?assertEqual(7, Seq),
?assertEqual(2, Pending),
?assert(is_integer(Pending), Pending >= 0 andalso Pending < 7),
?assertMatch([{_, {?DDOC2, <<"2-c">>}, ?LEAFREV}], Rows).

t_docs_id_filter({_, DbUrl}) ->
Expand Down

0 comments on commit c2498a9

Please sign in to comment.