[Groonga-commit] droonga/drntest at 47a00f4 [master] Reduce "p" use

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Jan 24 15:52:02 JST 2014


Kouhei Sutou	2014-01-24 15:52:02 +0900 (Fri, 24 Jan 2014)

  New Revision: 47a00f45817261b20dc1b60ae937e4ae065ee4ad
  https://github.com/droonga/drntest/commit/47a00f45817261b20dc1b60ae937e4ae065ee4ad

  Message:
    Reduce "p" use
    
    "p" is out of drntest report mechanism.

  Modified files:
    lib/drntest/response-normalizer.rb
    lib/drntest/test-executor.rb

  Modified: lib/drntest/response-normalizer.rb (+0 -4)
===================================================================
--- lib/drntest/response-normalizer.rb    2014-01-24 15:44:14 +0900 (ee49208)
+++ lib/drntest/response-normalizer.rb    2014-01-24 15:52:02 +0900 (9410c2c)
@@ -27,10 +27,6 @@ module Drntest
       normalize_fluent_message!(normalized_response)
       normalize_droonga_message!(normalized_response[2])
       normalized_response
-    rescue StandardError => error
-      puts "failed to normalize response"
-      p @response
-      raise error
     end
 
     private

  Modified: lib/drntest/test-executor.rb (+12 -1)
===================================================================
--- lib/drntest/test-executor.rb    2014-01-24 15:44:14 +0900 (309b423)
+++ lib/drntest/test-executor.rb    2014-01-24 15:52:02 +0900 (13b9b5d)
@@ -79,7 +79,18 @@ module Drntest
       def execute_request(request)
         if @logging
           request_process =****@clien*****(request) do |response|
-            @responses << normalize_response(request, response)
+            begin
+              @responses << normalize_response(request, response)
+            rescue
+              @responses << {
+                "error" => {
+                  "message" => "failed to normalize response",
+                  "detail" => "#{$!.message} (#{$!.class})",
+                  "backtrace" => $!.backtrace,
+                  "response" => response,
+                },
+              }
+            end
           end
           request_process.wait
         else
-------------- next part --------------
HTML����������������������������...
下載 



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