[Groonga-commit] droonga/fluent-plugin-droonga at 5b535e1 [master] test: follow search distributor change to support errors

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Jan 30 15:56:30 JST 2014


Kouhei Sutou	2014-01-30 15:56:30 +0900 (Thu, 30 Jan 2014)

  New Revision: 5b535e1c56b80a1cb841c96b647e13f78efa7da9
  https://github.com/droonga/fluent-plugin-droonga/commit/5b535e1c56b80a1cb841c96b647e13f78efa7da9

  Message:
    test: follow search distributor change to support errors

  Modified files:
    test/unit/plugin/distributor/test_search_planner.rb

  Modified: test/unit/plugin/distributor/test_search_planner.rb (+13 -3)
===================================================================
--- test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 15:51:32 +0900 (f4d8fcb)
+++ test/unit/plugin/distributor/test_search_planner.rb    2014-01-30 15:56:30 +0900 (f5d0e38)
@@ -1017,12 +1017,18 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
       reducer = {
         "type" => "search_reduce",
         "body" => {
+          "errors" => {
+            "errors_reduced" => {
+              "limit" => -1,
+              "type"  => "sum",
+            },
+          },
           query_name => {
             "#{query_name}_reduced" => reducer_body,
           },
         },
-        "inputs" => [query_name],
-        "outputs" => ["#{query_name}_reduced"],
+        "inputs" => ["errors", query_name],
+        "outputs" => ["errors_reduced", "#{query_name}_reduced"],
       }
 
       reducer
@@ -1057,8 +1063,12 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
       gatherer = {
         "type" => "search_gather",
         "body" => {
+          "errors_reduced" => {
+            "output" => "errors",
+          },
         },
         "inputs" => [
+          "errors_reduced",
         ],
         "post" => true,
       }
@@ -1117,7 +1127,7 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase
       query["output"]["format"] = "simple" if query["output"]
       query["output"]["unifiable"] = true if options[:unifiable]
 
-      outputs = []
+      outputs = ["errors"]
       outputs << query_name unless options[:no_output]
 
       searcher["type"] = "broadcast"
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index