[Groonga-commit] groonga/fluent-plugin-groonga [master] test: use not buffered driver

アーカイブの一覧に戻る

Kouhei Sutou null+****@clear*****
Fri Jan 18 17:15:33 JST 2013


Kouhei Sutou	2013-01-18 17:15:33 +0900 (Fri, 18 Jan 2013)

  New Revision: d72c2d659170e7518b3e12de8cf09a99b571aaa1
  https://github.com/groonga/fluent-plugin-groonga/commit/d72c2d659170e7518b3e12de8cf09a99b571aaa1

  Log:
    test: use not buffered driver

  Modified files:
    test/test_output.rb

  Modified: test/test_output.rb (+7 -6)
===================================================================
--- test/test_output.rb    2013-01-18 16:28:33 +0900 (2eeb7e7)
+++ test/test_output.rb    2013-01-18 17:15:33 +0900 (6293830)
@@ -34,8 +34,7 @@ class GroongaOutputTest < Test::Unit::TestCase
 
   private
   def create_driver(tag)
-    driver = Fluent::Test::BufferedOutputTestDriver.new(Fluent::GroongaOutput,
-                                                        tag)
+    driver = Fluent::Test::OutputTestDriver.new(Fluent::GroongaOutput, tag)
     driver.configure(configuration)
     driver
   end
@@ -99,8 +98,9 @@ EOC
       def test_basic_command
         driver = create_driver("groonga.command.table_create")
         time = Time.parse("2012-10-26T08:45:42Z").to_i
-        driver.emit({"name" => "Users"}, time)
-        driver.run
+        driver.run do
+          driver.emit({"name" => "Users"}, time)
+        end
         # p @request_headers
         # p @request_body
       end
@@ -193,8 +193,9 @@ EOC
       def test_basic_command
         driver = create_driver("groonga.command.table_create")
         time = Time.parse("2012-10-26T08:45:42Z")
-        driver.emit({"name" => "Users"}, time)
-        driver.run
+        driver.run do
+          driver.emit({"name" => "Users"}, time)
+        end
         assert_equal([
                        [
                          "--input-fd", actual_input_fd,
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る