garrensmith commented on a change in pull request #1738: test: port 
lots_of_docs.js to Elixir test suite
URL: https://github.com/apache/couchdb/pull/1738#discussion_r233480634
 
 

 ##########
 File path: test/elixir/test/lots_of_docs_test.exs
 ##########
 @@ -0,0 +1,56 @@
+defmodule LotsOfDocsTest do
+    use CouchTestCase
+    
+    @moduletag :lots_of_docs
+    @docs_range 0..499
+
+    @moduledoc """
+    Test saving a semi-large quanitity of documents and do some view queries.
+    This is a port of the lots_of_docs.js suite
+    """
+
+    @tag :with_db
+    test "lots of docs", context do
+        db_name = context[:db_name]
+        @docs_range
+            |> create_docs()
+            |> Enum.chunk_every(100)
+            |> Enum.each(fn(docs) -> bulk_post(docs, db_name) end)
+
+        %{"rows" => rows, "total_rows" => total_rows} = 
Couch.get("/#{db_name}/_all_docs").body
 
 Review comment:
   The javascript test seems to create a map/reduce view before querying it. 
Here is looks like  you using `_all_docs`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to