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 2021/10/25 17:58:46 UTC
[couchdb] branch 3.x updated: Fix flaky mem3_bdu test
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch 3.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/3.x by this push:
new 84d9234 Fix flaky mem3_bdu test
84d9234 is described below
commit 84d9234719f67dfeea0abd82d62ca0e50a03120f
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Mon Oct 25 13:18:55 2021 -0400
Fix flaky mem3_bdu test
The test only checks that we can update the shard doc so we just verifythat.
Apparently, it doesn't mean we can synchronously access the newly created db
info right away so we just skip that part to avoid a flaky failure.
---
src/mem3/test/eunit/mem3_bdu_test.erl | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/mem3/test/eunit/mem3_bdu_test.erl b/src/mem3/test/eunit/mem3_bdu_test.erl
index 56a64c0..056cced 100644
--- a/src/mem3/test/eunit/mem3_bdu_test.erl
+++ b/src/mem3/test/eunit/mem3_bdu_test.erl
@@ -89,8 +89,7 @@ t_can_insert_shard_map_doc({Top, Db}) ->
},
{Code, Res} = req(post, Top ++ ?DBS, ShardMap),
?assertEqual(201, Code),
- ?assertMatch(#{<<"ok">> := true}, Res),
- ?assertMatch({200, _}, req(get, Top ++ Db)).
+ ?assertMatch(#{<<"ok">> := true}, Res).
t_missing_by_node_section({Top, Db}) ->
@@ -236,7 +235,6 @@ t_replicated_changes_not_validated({Top, Db}) ->
{Code, Res} = req(post, Top ++ ?DBS ++ "/_bulk_docs", Docs),
?assertEqual(201, Code),
?assertEqual([], Res),
- ?assertMatch({200, _}, req(get, Top ++ Db)),
Deleted = #{
<<"id">> => Db,
<<"_rev">> => <<"1-abc">>,
@@ -269,12 +267,6 @@ sync_delete_db(Top, Db) when is_binary(Db) ->
end.
-req(Method, Url) ->
- Headers = [?AUTH],
- {ok, Code, _, Res} = test_request:request(Method, Url, Headers),
- {Code, jiffy:decode(Res, [return_maps])}.
-
-
req(Method, Url, #{} = Body) ->
req(Method, Url, jiffy:encode(Body));