diff options
author | Jay Doane <jay.s.doane@gmail.com> | 2019-03-25 17:57:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-25 17:57:37 -0700 |
commit | cbc0dd43d5aef87cfdde61a818c9b298a560d583 (patch) | |
tree | 1e921a65272d1f927f81a085b0a476b082f0d8ff | |
parent | 9f924e480a3f94226508d30e71c2b28f14c45830 (diff) | |
parent | 941578d5700988efdf10fa0434c05bb879e0ea58 (diff) | |
download | couchdb-cbc0dd43d5aef87cfdde61a818c9b298a560d583.tar.gz |
Merge pull request #1991 from cloudant/improve-elixir-test-stability
Improve elixir test stability
-rw-r--r-- | test/elixir/test/partition_all_docs_test.exs | 1 | ||||
-rw-r--r-- | test/elixir/test/partition_ddoc_test.exs | 26 |
2 files changed, 16 insertions, 11 deletions
diff --git a/test/elixir/test/partition_all_docs_test.exs b/test/elixir/test/partition_all_docs_test.exs index 5f1066cbe..816a8d6ed 100644 --- a/test/elixir/test/partition_all_docs_test.exs +++ b/test/elixir/test/partition_all_docs_test.exs @@ -182,6 +182,7 @@ defmodule PartitionAllDocsTest do # This test is timing based so it could be a little flaky. # If that turns out to be the case we should probably just skip it + @tag :pending test "partition _all_docs with timeout", context do set_config({"fabric", "partition_view_timeout", "1"}) diff --git a/test/elixir/test/partition_ddoc_test.exs b/test/elixir/test/partition_ddoc_test.exs index 85f66c45c..92ecae2af 100644 --- a/test/elixir/test/partition_ddoc_test.exs +++ b/test/elixir/test/partition_ddoc_test.exs @@ -160,16 +160,20 @@ defmodule PartitionDDocTest do test "GET /dbname/_design_docs", context do db_name = context[:db_name] - retry_until(fn -> - resp = Couch.put("/#{db_name}/_design/foo", body: %{stuff: "here"}) - assert resp.status_code == 201 - - resp = Couch.get("/#{db_name}/_design_docs") - assert resp.status_code == 200 - %{body: body} = resp - - assert length(body["rows"]) == 1 - %{"rows" => [%{"id" => "_design/foo"}]} = body - end) + retry_until( + fn -> + resp = Couch.put("/#{db_name}/_design/foo", body: %{stuff: "here"}) + assert resp.status_code == 201 + + resp = Couch.get("/#{db_name}/_design_docs") + assert resp.status_code == 200 + %{body: body} = resp + + assert length(body["rows"]) == 1 + %{"rows" => [%{"id" => "_design/foo"}]} = body + end, + 500, + 10_000 + ) end end |