diff options
author | garren smith <garren.smith@gmail.com> | 2019-02-25 21:05:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-25 21:05:30 +0200 |
commit | b81ca74e86d89189edbd05c837ba072c15aefd0a (patch) | |
tree | 5710b7ecec663daed37cab5682af6317cffef8c6 | |
parent | a54f420b21c124143c377148bcee2ecaeaa355e7 (diff) | |
download | couchdb-b81ca74e86d89189edbd05c837ba072c15aefd0a.tar.gz |
fixes to elixir tests (#1939)
-rw-r--r-- | test/elixir/lib/couch/db_test.ex | 10 | ||||
-rw-r--r-- | test/elixir/test/partition_size_test.exs | 7 |
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 |