test/test_dir_items.rb in zold-0.16.12 vs test/test_dir_items.rb in zold-0.16.13
- old
+ new
@@ -23,10 +23,11 @@
require 'minitest/autorun'
require 'tmpdir'
require 'threads'
require_relative 'test__helper'
require_relative '../lib/zold/age'
+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
@@ -34,10 +35,10 @@
class TestDirItems < Minitest::Test
def test_intensive_write_in_threads
Dir.mktmpdir do |dir|
file = File.join(dir, 'hey.txt')
back = Thread.start do
- loop do
+ Endless.new('test-diritems', log: test_log).run do
Zold::DirItems.new(dir).fetch
end
end
Threads.new(100).assert do
start = Time.now