Skip to content

Commit

Permalink
remove debug prints
Browse files Browse the repository at this point in the history
  • Loading branch information
tagomoris committed Dec 14, 2016
1 parent cb3b3a0 commit 5eb053e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/command/test_fluentd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ def execute_command(cmdline, chdir=TMP_DIR)
}
cmdname = cmdline.shift
arg0 = "testing-fluentd"
p(here: "executing process", env: env, cmdname: cmdname, arg0: arg0, args: cmdline)
# p(here: "executing process", env: env, cmdname: cmdname, arg0: arg0, args: cmdline)
IO.popen(env, [[cmdname, arg0], *cmdline], chdir: chdir, err: [:child, :out]) do |io|
pid = io.pid
begin
yield pid, io
p(here: "execute command", pid: pid, worker_pids: @worker_pids)
# p(here: "execute command", pid: pid, worker_pids: @worker_pids)
ensure
Process.kill(:KILL, pid) rescue nil
if @supervisor_pid
Expand All @@ -73,7 +73,7 @@ def execute_command(cmdline, chdir=TMP_DIR)
@worker_pids.each do |cpid|
Process.kill(:KILL, cpid) rescue nil
end
p(here: "execute command", pid: pid, exist: process_exist?(pid), worker_pids: @worker_pids, exists: @worker_pids.map{|i| process_exist?(i) })
# p(here: "execute command", pid: pid, exist: process_exist?(pid), worker_pids: @worker_pids, exists: @worker_pids.map{|i| process_exist?(i) })
Timeout.timeout(10){ sleep 0.1 while process_exist?(pid) }
end
end
Expand All @@ -95,7 +95,7 @@ def assert_log_matches(cmdline, *pattern_list, timeout: 10)
break if readables.first.eof?

buf = readables.first.readpartial(1024)
puts buf
# puts buf
stdio_buf << buf
lines = stdio_buf.split("\n")
if pattern_list.all?{|ptn| lines.any?{|line| ptn.is_a?(Regexp) ? ptn.match(line) : line.include?(ptn) } }
Expand Down

0 comments on commit 5eb053e

Please sign in to comment.