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 2026/03/26 21:03:56 UTC
(couchdb) branch unflake-auto-purge-tests created (now 77ad5398f)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch unflake-auto-purge-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 77ad5398f Try to unflake auto-purge plugin tests
This branch includes the following new commits:
new 77ad5398f Try to unflake auto-purge plugin tests
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: Try to unflake auto-purge plugin tests
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch unflake-auto-purge-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 77ad5398fcdc6dc6b8b82daf9def02530475507e
Author: Nick Vatamaniuc <va...@gmail.com>
AuthorDate: Thu Mar 26 15:54:41 2026 -0400
Try to unflake auto-purge plugin tests
Noticed some of these tests were failing in CI. It may be because the time we
set is exactly -3h, and 3h is also the minimum granularity period, so to avoid
falling exaclty on the end of it use a larger time interval of -6h.
---
.../test/eunit/couch_auto_purge_plugin_tests.erl | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/couch/test/eunit/couch_auto_purge_plugin_tests.erl b/src/couch/test/eunit/couch_auto_purge_plugin_tests.erl
index 8e71be0a1..46f1c56cf 100644
--- a/src/couch/test/eunit/couch_auto_purge_plugin_tests.erl
+++ b/src/couch/test/eunit/couch_auto_purge_plugin_tests.erl
@@ -72,7 +72,7 @@ t_no_auto_purge_by_default({_, DbName}) ->
ok.
t_auto_purge_after_config_ttl({_, DbName}) ->
- config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-3_hour", false),
+ config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-6_hour", false),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
meck:reset(couch_scanner_server),
@@ -83,7 +83,7 @@ t_auto_purge_after_config_ttl({_, DbName}) ->
ok.
t_auto_purge_after_db_ttl({_, DbName}) ->
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
meck:reset(couch_scanner_server),
@@ -105,7 +105,7 @@ t_no_auto_purge_after_config_ttl_set_to_infinity({_, DbName}) ->
ok.
t_no_auto_purge_after_db_ttl_set_to_infinity({_, DbName}) ->
- config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-3_hour", false),
+ config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-6_hour", false),
ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, <<"infinity">>}]),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
@@ -118,7 +118,7 @@ t_no_auto_purge_after_db_ttl_set_to_infinity({_, DbName}) ->
t_db_auto_purge_overrides_cluster_ttl_infinity({_, DbName}) ->
config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "infinity", false),
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
meck:reset(couch_scanner_server),
@@ -130,7 +130,7 @@ t_db_auto_purge_overrides_cluster_ttl_infinity({_, DbName}) ->
t_dry_run({_, DbName}) ->
config:set(atom_to_list(?PLUGIN), "dry_run", "true", false),
- config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-3_hour", false),
+ config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-6_hour", false),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
meck:reset(couch_scanner_server),
@@ -146,7 +146,7 @@ t_dry_run({_, DbName}) ->
t_dry_run_with_non_default_log_level({_, DbName}) ->
config:set(atom_to_list(?PLUGIN), "dry_run", "true", false),
config:set(atom_to_list(?PLUGIN), "log_level", "warning", false),
- config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-3_hour", false),
+ config:set(atom_to_list(?PLUGIN), "deleted_document_ttl", "-6_hour", false),
ok = add_doc(DbName, <<"doc1">>, #{<<"_deleted">> => true}),
?assertEqual(1, doc_del_count(DbName)),
meck:reset(couch_scanner_server),
@@ -162,7 +162,7 @@ t_dry_run_with_non_default_log_level({_, DbName}) ->
t_min_batch_size_1({_, DbName}) ->
meck:new(fabric, [passthrough]),
config:set_integer(atom_to_list(?PLUGIN), "min_batch_size", 5),
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
[
add_doc(DbName, <<"doc", (integer_to_binary(I))/binary>>, #{<<"_deleted">> => true})
|| I <- lists:seq(1, 10)
@@ -179,7 +179,7 @@ t_min_batch_size_1({_, DbName}) ->
t_min_batch_size_2({_, DbName}) ->
meck:new(fabric, [passthrough]),
config:set_integer(atom_to_list(?PLUGIN), "min_batch_size", 5),
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
[
add_doc(DbName, <<"doc", (integer_to_binary(I))/binary>>, #{<<"_deleted">> => true})
|| I <- lists:seq(1, 11)
@@ -197,7 +197,7 @@ t_max_batch_size_1({_, DbName}) ->
meck:new(fabric, [passthrough]),
config:set_integer(atom_to_list(?PLUGIN), "min_batch_size", 1),
config:set_integer(atom_to_list(?PLUGIN), "max_batch_size", 5),
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
[
add_replicated_doc(
DbName,
@@ -223,7 +223,7 @@ t_max_batch_size_2({_, DbName}) ->
meck:new(fabric, [passthrough]),
config:set_integer(atom_to_list(?PLUGIN), "min_batch_size", 1),
config:set_integer(atom_to_list(?PLUGIN), "max_batch_size", 5),
- ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-3_hour"}]),
+ ok = fabric:set_auto_purge_props(DbName, [{<<"deleted_document_ttl">>, "-6_hour"}]),
[
add_replicated_doc(
DbName,