diff options
author | Garren Smith <garren.smith@gmail.com> | 2019-02-21 14:13:09 +0200 |
---|---|---|
committer | Garren Smith <garren.smith@gmail.com> | 2019-02-21 17:58:42 +0200 |
commit | 9d0f81dcdd8df100b95db0d26a37051293f8fc71 (patch) | |
tree | 1618ac27502c5e90ad71755c2dd26afc2e0bf1f7 | |
parent | 9466ee0a8bc6c964dc930960b6b7f586e3908af2 (diff) | |
download | couchdb-jenkins-fix-elixir-take-3.tar.gz |
more tests failing and fixedjenkins-fix-elixir-take-3
-rw-r--r-- | test/elixir/test/security_validation_test.exs | 10 | ||||
-rw-r--r-- | test/elixir/test/view_collation_test.exs | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/test/elixir/test/security_validation_test.exs b/test/elixir/test/security_validation_test.exs index 56c4ec31b..0df3a780b 100644 --- a/test/elixir/test/security_validation_test.exs +++ b/test/elixir/test/security_validation_test.exs @@ -159,10 +159,12 @@ defmodule SecurityValidationTest do assert Couch.put("/#{db_name}/_security", body: sec_obj).body["ok"] assert Couch.post("/#{db_name}", body: @ddoc).body["ok"] - resp = Couch.put("/#{db_name}/test_doc", body: %{foo: 1}, headers: jerry) - assert resp.status_code == 403 - assert resp.body["error"] == "forbidden" - assert resp.body["reason"] == "Documents must have an author field" + retry_until(fn -> + resp = Couch.put("/#{db_name}/test_doc", body: %{foo: 1}, headers: jerry) + assert resp.status_code == 403 + assert resp.body["error"] == "forbidden" + assert resp.body["reason"] == "Documents must have an author field" + end) # Jerry can write the document assert Couch.put( diff --git a/test/elixir/test/view_collation_test.exs b/test/elixir/test/view_collation_test.exs index 6f9c3be83..7563ba416 100644 --- a/test/elixir/test/view_collation_test.exs +++ b/test/elixir/test/view_collation_test.exs @@ -81,11 +81,13 @@ defmodule ViewCollationTest do end test "descending collation order", context do - resp = Couch.get(url(context), query: %{"descending" => "true"}) - pairs = Enum.zip(resp.body["rows"], Enum.reverse(@values)) + retry_until(fn -> + resp = Couch.get(url(context), query: %{"descending" => "true"}) + pairs = Enum.zip(resp.body["rows"], Enum.reverse(@values)) - Enum.each(pairs, fn {row, value} -> - assert row["key"] == convert(value) + Enum.each(pairs, fn {row, value} -> + assert row["key"] == convert(value) + end) end) end |