You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/11/16 22:44:10 UTC

[GitHub] dottorblaster commented on a change in pull request #1738: test: port lots_of_docs.js to Elixir test suite

dottorblaster 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_r234369664
 
 

 ##########
 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:
   @garrensmith cool. I think I addressed this with my latest fixup, could you have a look? I created a whole new test for this purpose.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services