diff options
author | Nick Vatamaniuc <vatamane@gmail.com> | 2021-10-25 13:18:55 -0400 |
---|---|---|
committer | Nick Vatamaniuc <nickva@users.noreply.github.com> | 2021-10-25 13:58:41 -0400 |
commit | 84d9234719f67dfeea0abd82d62ca0e50a03120f (patch) | |
tree | 5b9ffced7735fabd1faa2c4ba2e66a403a28ae2b | |
parent | 56f4817f62189ca599ba54b106be6bb5316453f9 (diff) | |
download | couchdb-84d9234719f67dfeea0abd82d62ca0e50a03120f.tar.gz |
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.
-rw-r--r-- | src/mem3/test/eunit/mem3_bdu_test.erl | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/mem3/test/eunit/mem3_bdu_test.erl b/src/mem3/test/eunit/mem3_bdu_test.erl index 56a64c0bb..056cceda0 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)); |