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 2022/01/31 21:34:59 UTC
[couchdb] branch 3.x updated: Clear junk test dbs before running chttpd_dbs_info_tests
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 00ec897 Clear junk test dbs before running chttpd_dbs_info_tests
00ec897 is described below
commit 00ec8977cd3b5d08b095c8056df5e78fd904c6c4
Author: jiahuili <Ji...@ibm.com>
AuthorDate: Wed Jan 26 16:40:20 2022 -0600
Clear junk test dbs before running chttpd_dbs_info_tests
---
src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl | 3 ++-
src/fabric/test/eunit/fabric_db_create_tests.erl | 6 ++++--
src/fabric/test/eunit/fabric_rpc_tests.erl | 3 ++-
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl b/src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl
index cc7d694..ced5c9f 100644
--- a/src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl
+++ b/src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl
@@ -41,7 +41,8 @@ start_couch(Options) ->
end,
{TmpDb, Ctx}.
-stop_couch({_TmpDb, Ctx}) ->
+stop_couch({TmpDb, Ctx}) ->
+ fabric:delete_db(TmpDb),
test_util:stop_couch(Ctx).
clear() ->
diff --git a/src/fabric/test/eunit/fabric_db_create_tests.erl b/src/fabric/test/eunit/fabric_db_create_tests.erl
index a7c98a9..60acd30 100644
--- a/src/fabric/test/eunit/fabric_db_create_tests.erl
+++ b/src/fabric/test/eunit/fabric_db_create_tests.erl
@@ -32,7 +32,6 @@ setup() ->
test_util:start_couch([fabric]).
teardown(Ctx) ->
- meck:unload(),
test_util:stop_couch(Ctx).
t_handle_shard_doc_conflict() ->
@@ -44,4 +43,7 @@ t_handle_shard_doc_conflict() ->
[#shard{dbname = DbName}]
]),
meck:expect(fabric_util, recv, 4, {error, conflict}),
- ?assertEqual({error, file_exists}, fabric_db_create:go(DbName, [])).
+ ?assertEqual({error, file_exists}, fabric_db_create:go(DbName, [])),
+
+ meck:unload(),
+ ok = fabric:delete_db(DbName).
diff --git a/src/fabric/test/eunit/fabric_rpc_tests.erl b/src/fabric/test/eunit/fabric_rpc_tests.erl
index f47d153..5f86128 100644
--- a/src/fabric/test/eunit/fabric_rpc_tests.erl
+++ b/src/fabric/test/eunit/fabric_rpc_tests.erl
@@ -143,7 +143,8 @@ t_db_create_with_config(DbName) ->
[{engine, EngineName}]
end,
?assertEqual([{props, Props} | EngineProps], DbProps)
- end).
+ end),
+ ok = fabric:delete_db(MDbName).
test_db_doc() ->
{[