Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Rubinius Specs #418

Closed
wants to merge 3 commits into from

2 participants

Peter Goldstein Mike Perham
Peter Goldstein
Collaborator

This PR is the first part of an attempt to get the Rubinius specs green. The specs now run, but I'm seeing what appears to be a marshalling issue that I'm working to track down. Gems have been added in an Appraisal friendly way, and the master branch only restriction in the .travis.yml has been removed.

Specs run, but I'm seeing a single failing spec that I'm working to resolve.

Mike Perham
Owner

I'm wondering why you had to change server.rb.

Peter Goldstein
Collaborator

@mperham The behavior I am seeing is that the Timeout::Error from the Timeout block in the failing spec were being generated inside the self.serializer.dump(value) call in serialize and in the send(op, *args) call in request. The exact location of the raised error depended on the spec run, as you'd expect.

So as a first pass to get everything green I propagated the Timeout::Error method up the call stack. As far as I can tell there isn't an easy alternate fix, at least in the case of the request method, as it explicitly calls down! when receiving an exception not explicitly delineated in one of the rescue blocks. Happy to discuss other approaches.

While I'm seeing a local pass using Rubinius, there still seems to be a fail on Travis. Still looking.

Peter Goldstein
Collaborator

@mperham It looks like the fail on Travis was the 'stats items' spec, which seems to intermittently fail on other VMs as well. I've got a completely green build here - https://travis-ci.org/petergoldstein/dalli/builds/16451795

One oddity was that I needed to disable the minitest/pride extension to get minitest to print out the final test status for specs running under Rubinius. We know this works in other libraries (Sidekiq, for example) and I'm not clear why it's failing here. I'll try and take a deeper look later today - obviously we want the specs to remain fabulous.

Peter Goldstein
Collaborator

This is pretty out of date, so I'm going to close it. It'll be more productive to fix Rubinius specs against master once all the specs are green on other VMs.

Peter Goldstein petergoldstein deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 2, 2014
  1. Peter Goldstein
  2. Peter Goldstein
  3. Peter Goldstein

    Not sure why minitest/pride is causing specs to exit on Rubinius with…

    petergoldstein authored
    …out printing the report. Temporarily remove minitest/pride so we can see failures.
This page is out of date. Refresh to see the latest.
7 Appraisals
View
@@ -1,7 +1,14 @@
appraise 'rails3' do
gem 'rails', '>= 3', '< 4'
+
+ gem 'rubysl', '~> 2.0', :platform => :rbx
+ gem 'rubinius-developer_tools', :platform => :rbx
+
end
appraise 'rails4' do
gem 'rails', '>= 4.0.0.beta', '< 5'
+
+ gem 'rubysl', '~> 2.0', :platform => :rbx
+ gem 'rubinius-developer_tools', :platform => :rbx
end
3  Gemfile
View
@@ -7,6 +7,9 @@ gem 'kgio', :platform => :mri
gem 'appraisal'
gem 'connection_pool'
+gem 'rubysl', '~> 2.0', :platform => :rbx
+gem 'rubinius-developer_tools', :platform => :rbx
+
group :test do
gem 'simplecov'
end
3  gemfiles/rails3.gemfile
View
@@ -8,4 +8,7 @@ gem "kgio", :platform=>:mri
gem "appraisal"
gem "rails", ">= 3", "< 4"
+gem 'rubysl', '~> 2.0', :platform => :rbx
+gem 'rubinius-developer_tools', :platform => :rbx
+
gemspec :path=>"../"
3  gemfiles/rails4.gemfile
View
@@ -8,4 +8,7 @@ gem "kgio", :platform=>:mri
gem "appraisal"
gem "rails", ">= 4.0.0.beta", "< 5"
+gem 'rubysl', '~> 2.0', :platform => :rbx
+gem 'rubinius-developer_tools', :platform => :rbx
+
gemspec :path=>"../"
4 lib/dalli/server.rb
View
@@ -58,6 +58,8 @@ def request(op, *args)
raise Dalli::NetworkError, "#{hostname}:#{port} is down: #{@error} #{@msg}. If you are sure it is running, ensure memcached version is > 1.4." unless alive?
begin
send(op, *args)
+ rescue Timeout::Error
+ raise
rescue Dalli::NetworkError
raise
rescue Dalli::MarshalError => ex
@@ -391,6 +393,8 @@ def serialize(key, value, options=nil)
marshalled = true
begin
self.serializer.dump(value)
+ rescue Timeout::Error
+ raise
rescue => ex
# Marshalling can throw several different types of generic Ruby exceptions.
# Convert to a specific exception so we can special case it higher up the stack.
3  test/helper.rb
View
@@ -1,9 +1,8 @@
$TESTING = true
-require 'rubygems'
# require 'simplecov'
# SimpleCov.start
-require 'minitest/pride'
require 'minitest/autorun'
+# require 'minitest/pride'
require 'mocha/setup'
require 'memcached_mock'
Something went wrong with that request. Please try again.