summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanjo Rodriguez <juanjo@apache.org>2020-03-23 00:39:56 +0100
committerJuanjo Rodriguez <jjrodrig@gmail.com>2020-04-01 22:08:52 +0200
commitf3a3312424c0ca780f7c7a49d1adc871996735db (patch)
tree79777164f7732ef408384b467b4f748602dd25b6
parent42d20da6da3078b069ceee0a836fcb06322ff69f (diff)
downloadcouchdb-f3a3312424c0ca780f7c7a49d1adc871996735db.tar.gz
Improve test initialization
-rw-r--r--test/elixir/test/cookie_auth_test.exs15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/elixir/test/cookie_auth_test.exs b/test/elixir/test/cookie_auth_test.exs
index b10ee84f1..abc0fd767 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)