summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgarren smith <garren.smith@gmail.com>2019-02-25 21:05:30 +0200
committerGitHub <noreply@github.com>2019-02-25 21:05:30 +0200
commitb81ca74e86d89189edbd05c837ba072c15aefd0a (patch)
tree5710b7ecec663daed37cab5682af6317cffef8c6
parenta54f420b21c124143c377148bcee2ecaeaa355e7 (diff)
downloadcouchdb-b81ca74e86d89189edbd05c837ba072c15aefd0a.tar.gz
fixes to elixir tests (#1939)
-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