summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGarren Smith <garren.smith@gmail.com>2019-02-25 15:20:30 +0200
committerGarren Smith <garren.smith@gmail.com>2019-02-25 18:41:53 +0200
commitcb50c96ec333c9ff7b762e63c776832f08767e7c (patch)
tree5710b7ecec663daed37cab5682af6317cffef8c6
parenta54f420b21c124143c377148bcee2ecaeaa355e7 (diff)
downloadcouchdb-jenkins-more-elixir-fixes.tar.gz
-rw-r--r--test/elixir/lib/couch/db_test.ex10
-rw-r--r--test/elixir/test/partition_size_test.exs7
2 files changed, 11 insertions, 6 deletions
diff --git a/test/elixir/lib/couch/db_test.ex b/test/elixir/lib/couch/db_test.ex
index f835b0a77..7a08aae36 100644
--- a/test/elixir/lib/couch/db_test.ex
+++ b/test/elixir/lib/couch/db_test.ex
@@ -161,10 +161,12 @@ defmodule Couch.DBTest do
end
def create_db(db_name, opts \\ []) do
- resp = Couch.put("/#{db_name}", opts)
- assert resp.status_code in [201, 202]
- assert resp.body == %{"ok" => true}
- {:ok, resp}
+ retry_until(fn ->
+ resp = Couch.put("/#{db_name}", opts)
+ assert resp.status_code in [201, 202]
+ assert resp.body == %{"ok" => true}
+ {:ok, resp}
+ end)
end
def delete_db(db_name) do
diff --git a/test/elixir/test/partition_size_test.exs b/test/elixir/test/partition_size_test.exs
index 68759ad91..b292dc415 100644
--- a/test/elixir/test/partition_size_test.exs
+++ b/test/elixir/test/partition_size_test.exs
@@ -50,8 +50,11 @@ defmodule PartitionSizeTest do
end
body = %{:w => 3, :docs => docs}
- resp = Couch.post("/#{db_name}/_bulk_docs", body: body)
- assert resp.status_code == 201
+
+ retry_until(fn ->
+ resp = Couch.post("/#{db_name}/_bulk_docs", body: body)
+ assert resp.status_code == 201
+ end)
end
def save_doc(db_name, doc) do