[Groonga-commit] groonga/grntest at 9f6fa6a [master] http: handle SystemCallError

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jan 26 19:56:13 JST 2015


Kouhei Sutou	2015-01-26 19:56:13 +0900 (Mon, 26 Jan 2015)

  New Revision: 9f6fa6a9dab6886e284c9386ee0d3233d14e5e9b
  https://github.com/groonga/grntest/commit/9f6fa6a9dab6886e284c9386ee0d3233d14e5e9b

  Message:
    http: handle SystemCallError

  Modified files:
    lib/grntest/executors/http-executor.rb

  Modified: lib/grntest/executors/http-executor.rb (+4 -1)
===================================================================
--- lib/grntest/executors/http-executor.rb    2015-01-26 19:10:29 +0900 (69cf9e1)
+++ lib/grntest/executors/http-executor.rb    2015-01-26 19:56:13 +0900 (0fb9d97)
@@ -41,7 +41,7 @@ module Grntest
         n_retried = 0
         begin
           send_command(command("status"))
-        rescue SystemCallError
+        rescue Error
           n_retried += 1
           sleep(0.1)
           retry if n_retried < 10
@@ -93,6 +93,9 @@ module Grntest
           open(url, :read_timeout => @read_timeout) do |response|
             normalize_response_data(command, response.read)
           end
+        rescue SystemCallError
+          message = "failed to read response from Groonga: <#{url}>: #{$!}"
+          raise Error.new(message)
         rescue OpenURI::HTTPError
           $!.io.read
         end
-------------- next part --------------
HTML����������������������������...
Télécharger 



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