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 2023/03/04 06:58:34 UTC
[couchdb] branch fix-flaky-elixir-users-db-tests created (now 1c35aafd3)
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a change to branch fix-flaky-elixir-users-db-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
at 1c35aafd3 Fix flaky elixir users_db_tests
This branch includes the following new commits:
new 1c35aafd3 Fix flaky elixir users_db_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: Fix flaky elixir users_db_tests
Posted by va...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
vatamane pushed a commit to branch fix-flaky-elixir-users-db-tests
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 1c35aafd35320cbfe5739c347581897692498ce1
Author: Nick Vatamaniuc <va...@apache.org>
AuthorDate: Sat Mar 4 01:43:07 2023 -0500
Fix flaky elixir users_db_tests
This fails more often on MacOS CI workers [1] but it seems to be a general
flaky test as the users auth ddoc is not guaranteed to be inserted
synchronously.
[1] https://github.com/apache/couchdb/issues/4397#issue-1551336429
---
test/elixir/test/users_db_test.exs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/test/elixir/test/users_db_test.exs b/test/elixir/test/users_db_test.exs
index 0b7ee8199..a13c1a4f3 100644
--- a/test/elixir/test/users_db_test.exs
+++ b/test/elixir/test/users_db_test.exs
@@ -104,8 +104,12 @@ defmodule UsersDbTest do
test "users db", context do
db_name = context[:db_name]
# test that the users db is born with the auth ddoc
- ddoc = Couch.get("/#{@users_db_name}/_design/_auth")
- assert ddoc.body["validate_doc_update"] != nil
+ get_ddoc = fn ->
+ ddoc = Couch.get("/#{@users_db_name}/_design/_auth")
+ ddoc.body["validate_doc_update"]
+ end
+ retry_until(fn -> get_ddoc.() != nil end)
+ assert get_ddoc.() != nil
jchris_user_doc =
prepare_user_doc([