diff --git a/.travis.yml b/.travis.yml index f97f7cd66..b1a879e9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,10 +32,7 @@ matrix: - rvm: jruby-head gemfile: Gemfile.1.8.7 - # all? tests Failing in 1.7.5+ https://github.com/jruby/jruby/issues/1265 allow_failures: - - rvm: jruby-18mode - - rvm: jruby-19mode - rvm: jruby-head notifications: diff --git a/tests/aws/models/storage/file_tests.rb b/tests/aws/models/storage/file_tests.rb index b3285b952..94623b5a7 100644 --- a/tests/aws/models/storage/file_tests.rb +++ b/tests/aws/models/storage/file_tests.rb @@ -44,6 +44,10 @@ Shindo.tests("Storage[:aws] | file", ["aws"]) do end tests('#versions are all for the correct key').returns(true) do + # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep + # https://github.com/jruby/jruby/issues/1265 + pending if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/ + @instance.versions.all? { |v| v.key == @instance.key } end end diff --git a/tests/helpers/collection_helper.rb b/tests/helpers/collection_helper.rb index b2544c919..4026d40fe 100644 --- a/tests/helpers/collection_helper.rb +++ b/tests/helpers/collection_helper.rb @@ -36,11 +36,19 @@ def collection_tests(collection, params = {}, mocks_implemented = true) tests('Enumerable') do pending if Fog.mocking? && !mocks_implemented - [ + methods = [ 'all?', 'any?', 'find', 'detect', 'collect', 'map', 'find_index', 'flat_map', 'collect_concat', 'group_by', 'none?', 'one?' - ].each do |enum_method| + ] + + # JRuby 1.7.5+ issue causes a SystemStackError: stack level too deep + # https://github.com/jruby/jruby/issues/1265 + if RUBY_PLATFORM == "java" and JRUBY_VERSION =~ /1\.7\.[5-8]/ + methods.delete('all?') + end + + methods.each do |enum_method| if collection.respond_to?(enum_method) tests("##{enum_method}").succeeds do block_called = false