summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjiahuili <Jiahui.Li@ibm.com>2022-01-26 16:40:20 -0600
committerNick Vatamaniuc <nickva@users.noreply.github.com>2022-01-31 16:34:50 -0500
commit00ec8977cd3b5d08b095c8056df5e78fd904c6c4 (patch)
tree27cb9d46d67a6d08c211b3dc764639e3c3cae30d
parentbd6ec2763055e1d6a7674d6c10e15ae79d6d0892 (diff)
downloadcouchdb-00ec8977cd3b5d08b095c8056df5e78fd904c6c4.tar.gz
Clear junk test dbs before running chttpd_dbs_info_tests
-rw-r--r--src/ddoc_cache/test/eunit/ddoc_cache_tutil.erl3
-rw-r--r--src/fabric/test/eunit/fabric_db_create_tests.erl6
-rw-r--r--src/fabric/test/eunit/fabric_rpc_tests.erl3
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 cc7d694f0..ced5c9f99 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 a7c98a96f..60acd3031 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 f47d153ff..5f86128dd 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() ->
{[