You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ju...@apache.org on 2020/04/07 06:20:46 UTC
[couchdb] branch 3.x updated: Improve test initialization
This is an automated email from the ASF dual-hosted git repository.
juanjo 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 cf5f963 Improve test initialization
cf5f963 is described below
commit cf5f963bd5743346a642d6177cc10e3311bb505c
Author: Juanjo Rodriguez <ju...@apache.org>
AuthorDate: Mon Mar 23 00:39:56 2020 +0100
Improve test initialization
---
test/elixir/test/cookie_auth_test.exs | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/test/elixir/test/cookie_auth_test.exs b/test/elixir/test/cookie_auth_test.exs
index b10ee84..abc0fd7 100644
--- a/test/elixir/test/cookie_auth_test.exs
+++ b/test/elixir/test/cookie_auth_test.exs
@@ -34,13 +34,14 @@ defmodule CookieAuthTest do
# Create db if not exists
Couch.put("/#{@users_db}")
- resp =
- Couch.get(
- "/#{@users_db}/_changes",
- query: [feed: "longpoll", timeout: 5000, filter: "_design"]
- )
-
- assert resp.body
+ retry_until(fn ->
+ resp =
+ Couch.get(
+ "/#{@users_db}/_changes",
+ query: [feed: "longpoll", timeout: 5000, filter: "_design"]
+ )
+ length(resp.body["results"]) > 0
+ end)
on_exit(&tear_down/0)