[Groonga-commit] droonga/droonga-engine at 2a07b63 [master] Update test around HandlerMessenger for the current implenentation

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Jan 6 16:39:14 JST 2015


YUKI Hiroshi	2015-01-06 16:39:14 +0900 (Tue, 06 Jan 2015)

  New Revision: 2a07b63555bd255da8eb802f39a40b4ab398cfaf
  https://github.com/droonga/droonga-engine/commit/2a07b63555bd255da8eb802f39a40b4ab398cfaf

  Message:
    Update test around HandlerMessenger for the current implenentation

  Modified files:
    lib/droonga/test/stub_handler_messenger.rb
    test/unit/plugins/system/test_status.rb

  Modified: lib/droonga/test/stub_handler_messenger.rb (+2 -1)
===================================================================
--- lib/droonga/test/stub_handler_messenger.rb    2015-01-06 16:36:43 +0900 (649d355)
+++ lib/droonga/test/stub_handler_messenger.rb    2015-01-06 16:39:14 +0900 (32780b1)
@@ -17,12 +17,13 @@ module Droonga
   module Test
     class StubHandlerMessenger
       attr_reader :values, :messages
-      attr_accessor :engine_state
+      attr_accessor :engine_state, :cluster
 
       def initialize
         @values = []
         @messages = []
         @engine_state = nil
+        @cluster = nil
       end
 
       def emit(value)

  Modified: test/unit/plugins/system/test_status.rb (+1 -7)
===================================================================
--- test/unit/plugins/system/test_status.rb    2015-01-06 16:36:43 +0900 (723439f)
+++ test/unit/plugins/system/test_status.rb    2015-01-06 16:39:14 +0900 (ede77cd)
@@ -28,7 +28,7 @@ class SystemStatusHandlerTest < Test::Unit::TestCase
   def setup_handler
     @worker = StubWorker.new
     @messenger = Droonga::Test::StubHandlerMessenger.new
-    @messenger.engine_state = StubEngineState.new
+    @messenger.cluster = StubCluster.new
     @loop = nil
     @handler = Droonga::Plugins::System::StatusHandler.new("name",
                                                            @worker.context,
@@ -45,12 +45,6 @@ class SystemStatusHandlerTest < Test::Unit::TestCase
     @handler.handle(message)
   end
 
-  class StubEngineState
-    def cluster
-      @cluster ||= StubCluster.new
-    end
-  end
-
   class StubCluster
     def all_nodes
       [
-------------- next part --------------
HTML����������������������������...
Download 



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