[Groonga-commit] droonga/fluent-plugin-droonga at 08dc3a3 [master] Test: test out_droonga with stub engine

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Nov 20 18:58:21 JST 2013


YUKI Hiroshi	2013-11-20 18:58:21 +0900 (Wed, 20 Nov 2013)

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

  Message:
    Test: test out_droonga with stub engine

  Modified files:
    test/unit/test_output.rb

  Modified: test/unit/test_output.rb (+5 -5)
===================================================================
--- test/unit/test_output.rb    2013-11-20 18:52:32 +0900 (590b546)
+++ test/unit/test_output.rb    2013-11-20 18:58:21 +0900 (231252e)
@@ -16,14 +16,14 @@
 require "fluent/plugin/out_droonga"
 
 module OutputStub
-  class Worker
+  class Engine
     attr_reader :processed_record
     def initialize(response)
       @response = response
       @processed_record = nil
     end
 
-    def dispatch(tag, time, record)
+    def emit(tag, time, record)
       @processed_record = record
       @response
     end
@@ -50,14 +50,14 @@ module OutputStub
   end
 
   class Output < Fluent::DroongaOutput
-    attr_reader :worker
+    attr_reader :engine
     def initialize(response)
       @response = response
       super()
     end
 
     def start
-      @worker = Worker.new(@response)
+      @engine = Engine.new(@response)
     end
 
     def create_logger(tag, options)
@@ -80,7 +80,7 @@ class OutputTest < Test::Unit::TestCase
     driver.run do
       driver.emit(request, time)
     end
-    assert_equal(request, @output.worker.processed_record)
+    assert_equal(request, @output.engine.processed_record)
   end
 
   private
-------------- next part --------------
HTML����������������������������...
Download 



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