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/04 19:57:29 UTC
[couchdb] branch 3.0.x updated: Improve test initialization
This is an automated email from the ASF dual-hosted git repository.
juanjo pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/couchdb.git
The following commit(s) were added to refs/heads/3.0.x by this push:
new 37ac556 Improve test initialization
37ac556 is described below
commit 37ac556b33281f36bd56a61b3d45898d034b0515
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)