summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Doane <jaydoane@apache.org>2019-03-25 15:38:17 -0700
committerJay Doane <jaydoane@apache.org>2019-03-25 15:38:17 -0700
commit941578d5700988efdf10fa0434c05bb879e0ea58 (patch)
tree1e921a65272d1f927f81a085b0a476b082f0d8ff
parent9f924e480a3f94226508d30e71c2b28f14c45830 (diff)
downloadcouchdb-941578d5700988efdf10fa0434c05bb879e0ea58.tar.gz
Improve elixir test stability
• Disable self-admitted flaky "partition _all_docs with timeout" test • Double timeout for "GET /dbname/_design_docs" test
-rw-r--r--test/elixir/test/partition_all_docs_test.exs1
-rw-r--r--test/elixir/test/partition_ddoc_test.exs26
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