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

Upgrade to listen 3.0.5, re-enable tests

In listen 3.0.4 and below, the `#stop` method on the notification
backends are a no-op, meaning that we are leaking them per test. This
ended up triggering another bug in Ruby that causes our builds to fail
randomly on CI.

listen bug: https://github.com/guard/listen/issues/353
ruby bug: https://bugs.ruby-lang.org/issues/11744
This commit is contained in:
Godfrey Chan 2015-11-26 10:31:52 -08:00
parent e3bac3fa19
commit 14b20ce9b3
4 changed files with 5 additions and 16 deletions

View file

@ -45,7 +45,7 @@ end
# Active Support. # Active Support.
gem 'dalli', '>= 2.2.1' gem 'dalli', '>= 2.2.1'
gem 'listen', '~> 3.0.4' gem 'listen', '~> 3.0.5'
# Active Job. # Active Job.
group :job do group :job do

View file

@ -222,7 +222,7 @@ GEM
kindlerb (0.1.1) kindlerb (0.1.1)
mustache mustache
nokogiri nokogiri
listen (3.0.4) listen (3.0.5)
rb-fsevent (>= 0.9.3) rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9) rb-inotify (>= 0.9)
loofah (2.0.3) loofah (2.0.3)
@ -342,7 +342,7 @@ DEPENDENCIES
jquery-rails! jquery-rails!
json json
kindlerb (= 0.1.1) kindlerb (= 0.1.1)
listen (~> 3.0.4) listen (~> 3.0.5)
mail! mail!
minitest (< 5.3.4) minitest (< 5.3.4)
mocha (~> 0.14) mocha (~> 0.14)

View file

@ -5,11 +5,6 @@ require 'file_update_checker_shared_tests'
class FileEventedUpdateCheckerTest < ActiveSupport::TestCase class FileEventedUpdateCheckerTest < ActiveSupport::TestCase
include FileUpdateCheckerSharedTests include FileUpdateCheckerSharedTests
def setup
skip if ENV['LISTEN'] == '0'
super
end
def new_checker(files = [], dirs = {}, &block) def new_checker(files = [], dirs = {}, &block)
ActiveSupport::FileEventedUpdateChecker.new(files, dirs, &block).tap do ActiveSupport::FileEventedUpdateChecker.new(files, dirs, &block).tap do
wait wait

View file

@ -111,14 +111,8 @@ class Build
end end
def env def env
if activesupport? && !isolated? # Provide extra ENV variables for the build here
# There is a known issue with the listen tests that casuses files to be {}
# incorrectly GC'ed even when they are still in-use. The current is to
# only run them in isolation to avoid randomly failing our test suite.
{ 'LISTEN' => '0' }
else
{}
end
end end
def run_bug_report_templates def run_bug_report_templates