You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/08/12 18:39:50 UTC
[couchdb] 04/05: Fix Elixir tests for ebtree views
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch prototype/fdb-layer-ebtree-views
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e86ac9c7d58bd2711f28fd71f912c907673a69d0
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Thu Aug 6 12:40:14 2020 -0500
Fix Elixir tests for ebtree views
---
test/elixir/test/map_test.exs | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/elixir/test/map_test.exs b/test/elixir/test/map_test.exs
index 9254cc4..038ad93 100644
--- a/test/elixir/test/map_test.exs
+++ b/test/elixir/test/map_test.exs
@@ -503,6 +503,10 @@ defmodule ViewMapTest do
assert keys == ["bar"]
end
+ # Unfortunately, I'm not able to create a test that fails
+ # as quickly as the previous view implementations. Apparently
+ # the new ebtree approach uses fewer bytes in the transaction.
+ @tag config: [{"couch_views", "retry_limit", "0"}]
test "send error for failed indexing", context do
db_name = context[:db_name]
@@ -515,7 +519,7 @@ defmodule ViewMapTest do
map: """
function (doc) {
for (var i=0; i<10000; i++) {
- emit({doc: doc._id + 1}, doc._id);
+ emit({doc: doc._id + i}, doc._id);
}
}
"""
@@ -529,7 +533,8 @@ defmodule ViewMapTest do
url = "/#{db_name}/_design/view1/_view/view"
- resp = Couch.get(url, timeout: 500_000)
+ options = [timeout: 500_000, ibrowse: [inactivity_timeout: 500_000]]
+ resp = Couch.get(url, options)
assert resp.status_code == 500
%{:body => %{"error" => error}} = resp
assert error == "foundationdb_error"