test/test_dir_items.rb in zold-0.31.8 vs test/test_dir_items.rb in zold-0.31.9

- old
+ new

@@ -1,8 +1,8 @@ # frozen_string_literal: true -# Copyright (c) 2018-2023 Zerocracy +# Copyright (c) 2018-2024 Zerocracy # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the 'Software'), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell @@ -28,24 +28,24 @@ require_relative '../lib/zold/endless' require_relative '../lib/zold/dir_items' # DirItems test. # Author:: Yegor Bugayenko (yegor256@gmail.com) -# Copyright:: Copyright (c) 2018 Yegor Bugayenko +# Copyright:: Copyright (c) 2018-2024 Zerocracy # License:: MIT class TestDirItems < Zold::Test def test_intensive_write_in_threads Dir.mktmpdir do |dir| file = File.join(dir, 'hey.txt') back = Thread.start do - Zold::Endless.new('test-diritems', log: test_log).run do + Zold::Endless.new('test-diritems', log: fake_log).run do Zold::DirItems.new(dir).fetch end end Threads.new(100).assert do start = Time.now File.write(file, 'test') - test_log.info("Saved in #{Zold::Age.new(start)}") + fake_log.info("Saved in #{Zold::Age.new(start)}") sleep 1 end back.kill end end