YUKI Hiroshi
null+****@clear*****
Fri Jan 31 17:24:02 JST 2014
YUKI Hiroshi 2014-01-31 17:24:02 +0900 (Fri, 31 Jan 2014) New Revision: b7776f1527e59bbd6d82628d862d5df46c6bcff4 https://github.com/droonga/fluent-plugin-droonga/commit/b7776f1527e59bbd6d82628d862d5df46c6bcff4 Message: Remove duplicated test Modified files: test/unit/plugin/distributor/test_search_planner.rb Modified: test/unit/plugin/distributor/test_search_planner.rb (+0 -103) =================================================================== --- test/unit/plugin/distributor/test_search_planner.rb 2014-01-31 17:23:25 +0900 (1093de0) +++ test/unit/plugin/distributor/test_search_planner.rb 2014-01-31 17:24:02 +0900 (2ac318b) @@ -1052,109 +1052,6 @@ class DistributedSearchPlannerTest < Test::Unit::TestCase =begin class SingleQueryTest < self - def test_have_sortBy_offset_limit - request = { - "type" => "search", - "dataset" => "Droonga", - "body" => { - "queries" => { - "have_records" => { - "source" => "User", - "sortBy" => { - "keys" => ["name"], - "offset" => 1, - "limit" => 2, - }, - "output" => { - "format" => "complex", - "elements" => ["records"], - "attributes" => ["_key", "name", "age"], - "offset" => 4, - "limit" => 8, - }, - }, - }, - }, - } - - sort_limit = 1 + 4 + [2, 8].max - output_limit = 1 + 4 + [2, 8].min - expected_plan = [] - expected_plan << reducer(request, { - "records" => { - "type" => "sort", - "operators" => [ - { "column" => 1, "operator" => "<" }, - ], - "limit" => output_limit, - }, - }) - expected_plan << gatherer(request, :elements => { - "records" => records_mapper( - :offset => 5, - :limit => 2, - :format => "complex", - :attributes => ["_key", "name", "age"], - ), - }) - expected_plan << searcher(request, :sort_offset => 0, - :sort_limit => sort_limit, - :output_offset => 0, - :output_limit => output_limit) - assert_equal(expected_plan, plan(request)) - end - - def test_have_sortBy_with_infinity_output_limit - request = { - "type" => "search", - "dataset" => "Droonga", - "body" => { - "queries" => { - "have_records" => { - "source" => "User", - "sortBy" => { - "keys" => ["name"], - "offset" => 1, - "limit" => 2, - }, - "output" => { - "format" => "complex", - "elements" => ["records"], - "attributes" => ["_key", "name", "age"], - "offset" => 4, - "limit" => -1, - }, - }, - }, - }, - } - - limit = 1 + 4 + 2 - expected_plan = [] - expected_plan << reducer(request, { - "records" => { - "type" => "sort", - "operators" => [ - { "column" => 1, "operator" => "<" }, - ], - "limit" => limit, - }, - }) - expected_plan << gatherer(request, :elements => { - "records" => records_mapper( - :offset => 5, - :limit => 2, - :format => "complex", - :attributes => ["_key", "name", "age"], - ), - }) - expected_plan << searcher(request, :sort_offset => 0, - :sort_limit => limit, - :output_offset => 0, - :output_limit => limit) - assert_equal(expected_plan, plan(request)) - end - def test_have_sortBy_with_infinity_sort_limit request = { "type" => "search", -------------- next part -------------- HTML����������������������������...Download