[Groonga-commit] droonga/fluent-plugin-droonga at d6d7697 [master] Remove tests for "offset" of reducer

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Nov 28 15:02:41 JST 2013


YUKI Hiroshi	2013-11-28 15:02:41 +0900 (Thu, 28 Nov 2013)

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

  Message:
    Remove tests for "offset" of reducer

  Modified files:
    test/unit/plugin/collector/test_basic.rb

  Modified: test/unit/plugin/collector/test_basic.rb (+12 -11)
===================================================================
--- test/unit/plugin/collector/test_basic.rb    2013-11-28 14:58:20 +0900 (b5b4b46)
+++ test/unit/plugin/collector/test_basic.rb    2013-11-28 15:02:41 +0900 (a3ad181)
@@ -127,7 +127,7 @@ class BasicCollectorTest < Test::Unit::TestCase
                    @messages.last)
     end
 
-    def test_sum_with_offset_and_limit
+    def test_sum_with_limit
       input_name = "input_#{Time.now.to_i}"
       output_name = "output_#{Time.now.to_i}"
       request = {
@@ -153,17 +153,14 @@ class BasicCollectorTest < Test::Unit::TestCase
                 output_name => {
                   "numeric_value" => {
                     "type" => "sum",
-                    "offset" => 2,
                     "limit" => 2,
                   },
                   "numeric_key_records" => {
                     "type" => "sum",
-                    "offset" => 2,
                     "limit" => 2,
                   },
                   "string_key_records" => {
                     "type" => "sum",
-                    "offset" => 3,
                     "limit" => -1,
                   },
                 },
@@ -194,10 +191,13 @@ class BasicCollectorTest < Test::Unit::TestCase
                      {
                        "numeric_value" => 3,
                        "numeric_key_records" => [
-                         create_record(3),
-                         create_record(4),
+                         create_record(1),
+                         create_record(2),
                        ],
                        "string_key_records" => [
+                         create_record("a"),
+                         create_record("b"),
+                         create_record("c"),
                          create_record("d"),
                          create_record("e"),
                          create_record("f"),
@@ -286,7 +286,7 @@ class BasicCollectorTest < Test::Unit::TestCase
                    @messages.last)
     end
 
-    def test_sort_with_limit_and_offset
+    def test_sort_with_limit
       input_name = "input_#{Time.now.to_i}"
       output_name = "output_#{Time.now.to_i}"
       request = {
@@ -312,13 +312,11 @@ class BasicCollectorTest < Test::Unit::TestCase
                   "numeric_key_records" => {
                     "type" => "sort",
                     "order" => ["<"],
-                    "offset" => 2,
                     "limit" => 2,
                   },
                   "string_key_records" => {
                     "type" => "sort",
                     "order" => ["<"],
-                    "offset" => 3,
                     "limit" => -1,
                   },
                 },
@@ -347,10 +345,13 @@ class BasicCollectorTest < Test::Unit::TestCase
       assert_equal([
                      {
                        "numeric_key_records" => [
-                         create_record(3),
-                         create_record(4),
+                         create_record(1),
+                         create_record(2),
                        ],
                        "string_key_records" => [
+                         create_record("a"),
+                         create_record("b"),
+                         create_record("c"),
                          create_record("d"),
                          create_record("e"),
                          create_record("f"),
-------------- next part --------------
HTML����������������������������...
Download 



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