aboutsummaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorGodfrey Chan <godfreykfc@gmail.com>2015-11-26 02:52:00 -0800
committerGodfrey Chan <godfreykfc@gmail.com>2015-11-26 02:52:00 -0800
commit71ffd9b521685cefd64f53eba989012701cef590 (patch)
tree17e10faa25f1ad517c75338efae80e45d1b06b81 /ci
parent3fcc0ca99107fa57110421b392f5854555f17fe2 (diff)
downloadrails-71ffd9b521685cefd64f53eba989012701cef590.tar.gz
rails-71ffd9b521685cefd64f53eba989012701cef590.tar.bz2
rails-71ffd9b521685cefd64f53eba989012701cef590.zip
Only run listen tests in isolation, for now
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.
Diffstat (limited to 'ci')
-rwxr-xr-xci/travis.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/ci/travis.rb b/ci/travis.rb
index 52fef05fbf..658d66c6b4 100755
--- a/ci/travis.rb
+++ b/ci/travis.rb
@@ -72,6 +72,10 @@ class Build
key.join(':')
end
+ def activesupport?
+ gem == 'activesupport'
+ end
+
def activerecord?
gem == 'activerecord'
end
@@ -101,11 +105,22 @@ class Build
tasks.each do |task|
cmd = "bundle exec rake #{task}"
puts "Running command: #{cmd}"
- return false unless system(cmd)
+ return false unless system(env, cmd)
end
true
end
+ def env
+ if activesupport? && !isolated?
+ # 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
+
def run_bug_report_templates
Dir.glob('bug_report_templates/*.rb').all? do |file|
system(Gem.ruby, '-w', file)