1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_logger.rb: clear garbage files

* test/logger/test_logger.rb (test_shifting_age_in_multiprocess):
  unlink rotated log files all.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-11-07 18:11:38 +00:00
parent 1062dcf4df
commit 74f424c26a

View file

@ -506,9 +506,6 @@ class TestLogDevice < Test::Unit::TestCase
def test_shifting_age_in_multiprocess
yyyymmdd = Time.now.strftime("%Y%m%d")
filename1 = @filename + ".#{yyyymmdd}"
filename2 = @filename + ".#{yyyymmdd}.1"
filename3 = @filename + ".#{yyyymmdd}.2"
begin
stderr = run_children(2, [@filename], <<-'END')
logger = Logger.new(ARGV[0], 'now')
@ -520,7 +517,7 @@ class TestLogDevice < Test::Unit::TestCase
assert_no_match(/log writing failed/, stderr)
assert_no_match(/log rotation inter-process lock failed/, stderr)
ensure
[filename1, filename2, filename3].each do |filename|
Dir.glob("#{@filename}.#{yyyymmdd}{,.[1-9]*}") do |filename|
File.unlink(filename) if File.exist?(filename)
end
end