You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by va...@apache.org on 2023/01/26 05:11:55 UTC
[couchdb] 02/02: Fix flaky chttpd_changes_test
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch fix-flaky-windows-test
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit c2498a911414375ba16e93d9dd551b84ea25d539
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Thu Jan 26 00:09:25 2023 -0500
Fix flaky chttpd_changes_test
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.
---
src/chttpd/test/eunit/chttpd_changes_test.erl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/chttpd/test/eunit/chttpd_changes_test.erl b/src/chttpd/test/eunit/chttpd_changes_test.erl
index f780118c6..f1eb32924 100644
--- a/src/chttpd/test/eunit/chttpd_changes_test.erl
+++ b/src/chttpd/test/eunit/chttpd_changes_test.erl
@@ -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}) ->