summaryrefslogtreecommitdiff
path: root/test/logger/test_logdevice.rb
diff options
context:
space:
mode:
authorJesse Chavez <jesse.chavez.r@gmail.com>2022-01-26 14:05:21 -0500
committergit <svn-admin@ruby-lang.org>2022-01-27 12:33:06 +0900
commit99d02caed3fb86a8bbe3ae6daddf2517e2f3f441 (patch)
tree985717e6eac13f8235ae63a028164b93bc91a4c6 /test/logger/test_logdevice.rb
parentd3d888b9867e4fe6baa28d4f5351f72961a3bb1f (diff)
downloadruby-99d02caed3fb86a8bbe3ae6daddf2517e2f3f441.tar.gz
[ruby/logger] Fix log rotation inter-process lock failed.
Issue only occurs in JRuby 9.3.0.0 and Windows and the full console output is: log rotation inter-process lock failed. D:\log.txt -> D:\log.txt.0: The process cannot access the file because it is being used by another process. log writing failed. closed stream log writing failed. closed stream ... https://github.com/ruby/logger/commit/19fc734638
Diffstat (limited to 'test/logger/test_logdevice.rb')
-rw-r--r--test/logger/test_logdevice.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/logger/test_logdevice.rb b/test/logger/test_logdevice.rb
index d360fa2107..8f1c15542a 100644
--- a/test/logger/test_logdevice.rb
+++ b/test/logger/test_logdevice.rb
@@ -435,6 +435,7 @@ class TestLogDevice < Test::Unit::TestCase
logdev1.write(message)
assert_file.identical?(log, logdev1.dev)
+ # NOTE: below assertion fails in JRuby 9.3 and TruffleRuby
assert_file.identical?(log + ".0", logdev2.dev)
logdev2.write(message)
@@ -451,7 +452,7 @@ class TestLogDevice < Test::Unit::TestCase
end
ensure
logdev0.close
- end unless /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
+ end unless /mswin|mingw|cygwin/ =~ RbConfig::CONFIG['host_os']
def test_shifting_midnight
Dir.mktmpdir do |tmpdir|