[Groonga-commit] pgroonga/pgroonga at cbe9b1d [master] test: avoid read block

Back to archive index

Kouhei Sutou null+****@clear*****
Wed Jan 4 15:43:40 JST 2017


Kouhei Sutou	2017-01-04 15:43:40 +0900 (Wed, 04 Jan 2017)

  New Revision: cbe9b1df8a1224a4c3f135d381ea274588c517cd
  https://github.com/pgroonga/pgroonga/commit/cbe9b1df8a1224a4c3f135d381ea274588c517cd

  Message:
    test: avoid read block

  Modified files:
    test/helpers/sandbox.rb

  Modified: test/helpers/sandbox.rb (+10 -2)
===================================================================
--- test/helpers/sandbox.rb    2017-01-04 15:43:22 +0900 (d575fe1)
+++ test/helpers/sandbox.rb    2017-01-04 15:43:40 +0900 (2056392)
@@ -39,8 +39,16 @@ module Helpers
     def run_command(*args)
       pid, output_read, error_read = spawn_process(*args)
       _, status = Process.waitpid2(pid)
-      output = output_read.read
-      error = error_read.read
+      begin
+        output = output_read.readpartial(4096)
+      rescue EOFError
+        output = ""
+      end
+      begin
+        error = error_read.readpartial(4096)
+      rescue EOFError
+        error = ""
+      end
       unless status.success?
         command_line = args.join(" ")
         message = "failed to run: #{command_line}\n"
-------------- next part --------------
HTML����������������������������...
Download 



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