This is an automated email from the ASF dual-hosted git repository. jiahuili430 pushed a commit to branch 3.5.1-elixir-search in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit a08bb66bab1d86607880e2ae8f00cc06dc3c47c2 Author: Jiahui Li <[email protected]> AuthorDate: Sun Apr 12 18:59:46 2026 -0500 Increase default timeout to fix flaky elixir tests --- test/elixir/test/partition_search_test.exs | 4 ++-- test/elixir/test/search_test.exs | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/test/elixir/test/partition_search_test.exs b/test/elixir/test/partition_search_test.exs index 9310e701d..93eebaf14 100644 --- a/test/elixir/test/partition_search_test.exs +++ b/test/elixir/test/partition_search_test.exs @@ -177,7 +177,7 @@ defmodule PartitionSearchTest do create_ddoc(db_name) url = "/#{db_name}/_design/library/_search/books" - resp = Couch.get(url, query: %{q: "some:field"}) + resp = Couch.get(url, query: %{q: "some:field"}, opts: [timeout: 60_000]) assert_on_status(resp, 200, "Failed to search on non-partitioned dbs without the limit.") ids = get_ids(resp) assert Enum.sort(ids) == Enum.sort(["bar:1", "bar:5", "bar:9", "foo:2", "bar:3", "foo:4", "foo:6", "bar:7", "foo:8", "foo:10"]) @@ -192,7 +192,7 @@ defmodule PartitionSearchTest do url = "/#{db_name}/_design/library/_search/books" # score order varies by Lucene version, so captured this order first. - resp = Couch.get(url, query: %{q: "some:field"}) + resp = Couch.get(url, query: %{q: "some:field"}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Failed to search on non-partitioned dbs without the limit.") expected_ids = get_ids(resp) diff --git a/test/elixir/test/search_test.exs b/test/elixir/test/search_test.exs index ad5a13dbb..0299be987 100644 --- a/test/elixir/test/search_test.exs +++ b/test/elixir/test/search_test.exs @@ -74,7 +74,7 @@ defmodule SearchTest do create_ddoc(db_name) url = "/#{db_name}/_design/inventory/_search/fruits" - resp = Couch.get(url, query: %{q: "*:*", include_docs: true}) + resp = Couch.get(url, query: %{q: "*:*", include_docs: true}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") ids = get_items(resp) assert Enum.sort(ids) == Enum.sort(["apple", "banana", "carrot", "date"]) @@ -87,7 +87,7 @@ defmodule SearchTest do create_ddoc(db_name) url = "/#{db_name}/_design/inventory/_search/fruits" - resp = Couch.get(url, query: %{q: "*:*", drilldown: :jiffy.encode(["place", "kitchen"]), include_docs: true}) + resp = Couch.get(url, query: %{q: "*:*", drilldown: :jiffy.encode(["place", "kitchen"]), include_docs: true}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") ids = get_items(resp) @@ -115,7 +115,7 @@ defmodule SearchTest do create_ddoc(db_name) url = "/#{db_name}/_design/inventory/_search/fruits" - resp = Couch.get(url, query: %{q: "*:*", drilldown: :jiffy.encode([["state", "old"], ["item", "apple"]]), include_docs: true}) + resp = Couch.get(url, query: %{q: "*:*", drilldown: :jiffy.encode([["state", "old"], ["item", "apple"]]), include_docs: true}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") ids = get_items(resp) @@ -172,7 +172,7 @@ defmodule SearchTest do create_ddoc(db_name) url = "/#{db_name}/_design/inventory/_search/fruits" - resp = Couch.post(url, body: %{query: "*:*", drilldown: ["state", "new", "unknown"], include_docs: true}) + resp = Couch.post(url, body: %{query: "*:*", drilldown: ["state", "new", "unknown"], include_docs: true}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") ids = get_items(resp) @@ -254,7 +254,7 @@ defmodule SearchTest do url = "/#{db_name}/_design/inventory/_search/fruits" counts = ["place"] - resp = Couch.get(url, query: %{q: "*:*", limit: 0, counts: :jiffy.encode(counts)}) + resp = Couch.get(url, query: %{q: "*:*", limit: 0, counts: :jiffy.encode(counts)}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") %{:body => %{"counts" => counts}} = resp @@ -299,7 +299,7 @@ defmodule SearchTest do url = "/#{db_name}/_design/inventory/_search/fruits" ranges = %{"price" => %{}} - resp = Couch.get(url, query: %{q: "*:*", limit: 0, ranges: :jiffy.encode(ranges)}) + resp = Couch.get(url, query: %{q: "*:*", limit: 0, ranges: :jiffy.encode(ranges)}, opts: [timeout: 30_000]) assert_on_status(resp, 200, "Fail to do search.") %{:body => %{"ranges" => ranges}} = resp
