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 1d5a61b853bad58bc1e944259ad77cd4a612b239
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           | 8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/elixir/test/partition_search_test.exs 
b/test/elixir/test/partition_search_test.exs
index 9310e701d..3e3d7a670 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: 30_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..dc8a6b461 100644
--- a/test/elixir/test/search_test.exs
+++ b/test/elixir/test/search_test.exs
@@ -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)
@@ -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

Reply via email to