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:21:03 UTC

[couchdb] branch remove-flaky-bdu-test-statement created (now 659c0c6)

This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a change to branch remove-flaky-bdu-test-statement
in repository https://gitbox.apache.org/repos/asf/couchdb.git.


      at 659c0c6  Fix flaky mem3_bdu test

This branch includes the following new commits:

     new 659c0c6  Fix flaky mem3_bdu test

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[couchdb] 01/01: Fix flaky mem3_bdu test

Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

vatamane pushed a commit to branch remove-flaky-bdu-test-statement
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 659c0c6a479586a3a6d410196f63cef947635a47
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 check for
    that. Apparently, it doesn't mean we can synchronously access the newly created
    db info right away so we just skip that part to avoid 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));