YUKI Piro Hiroshi
null+****@clear*****
Fri Mar 27 03:06:19 JST 2015
YUKI "Piro" Hiroshi 2015-03-27 03:06:19 +0900 (Fri, 27 Mar 2015) New Revision: 529ac795abe5da842b38a274be1d8b7e70486ec9 https://github.com/droonga/drntest/commit/529ac795abe5da842b38a274be1d8b7e70486ec9 Message: Normalize result of system.status Modified files: lib/drntest/response-normalizer.rb Modified: lib/drntest/response-normalizer.rb (+13 -0) =================================================================== --- lib/drntest/response-normalizer.rb 2015-03-20 13:01:58 +0900 (3268cee) +++ lib/drntest/response-normalizer.rb 2015-03-27 03:06:19 +0900 (2dc4cdc) @@ -39,6 +39,8 @@ module Drntest normalize_groonga_command_response!(body) elsif search_command? normalize_search_command_response!(body) + elsif system_status_command? + normalize_system_status_command_response!(body) end end @@ -61,6 +63,10 @@ module Drntest @request["type"] == "search" end + def system_status_command? + @request["type"] == "system.status" + end + def normalize_droonga_message_envelope!(message) normalized_in_reply_to = "request-id" in_reply_to = message["inReplyTo"] @@ -164,6 +170,13 @@ module Drntest end end + def normalize_system_status_command_response!(response) + reporter = response["reporter"] + if reporter + response["reporter"] = reporter.sub(/:\d+/, ":0") + end + end + def valid_start_time?(start_time) start_time.is_a?(Float) and start_time > 0 end -------------- next part -------------- HTML����������������������������...Download