This project is archived and is in readonly mode.

#3051 ✓resolved
Jatinder Singh

ActiveResource#load test fails on 64 bit machines

Reported by Jatinder Singh | August 14th, 2009 @ 01:14 PM

http://ci.rubyonrails.org/builds/rails?build=ce2422c reported following test failure.

@@ [CruiseControl] Building ActiveResource /usr/local/bin/ruby -w -Ilib:/home/ci/.cruise/projects/rails/work/activeresource/../activesupport/lib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/base_test.rb" "test/format_test.rb" "test/base_errors_test.rb" "test/observing_test.rb" "test/authorization_test.rb" "test/base/equality_test.rb" "test/base/custom_methods_test.rb" "test/base/load_test.rb" "test/connection_test.rb" (in /home/ci/.cruise/projects/rails/work/activeresource) Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader Started ...................................F............................................................................................................................ Finished in 1.989839 seconds. 1) Failure: test_recursively_loaded_collections(BaseLoadTest) [./test/base/load_test.rb:138:in test_recursively_loaded_collections' /usr/local/lib/ruby/gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:insend' /usr/local/lib/ruby/gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in run']: <1234567890> expected to be kind_of? <Bignum> but was <Fixnum>. @@

This test started failing after this commit. The reason why this test wasn't failing on most of the machines of bugmash participants, as they all probably were 32-bit. However this fails consistently on 64bit machine. Test was assuming that "1234567890" is Bignum. however its "Fixnum" on 64 bit machines.

I've attached a patch(for master) with a simple fix to verify if the value is kind_of?(Numeric) instead of Fixnum or Bignum.

Comments and changes to this ticket

  • Jatinder Singh

    Jatinder Singh August 14th, 2009 @ 01:16 PM

    Formatting screwed up. trying again.

    @@

    [CruiseControl] Building ActiveResource /usr/local/bin/ruby -w -Ilib:/home/ci/.cruise/projects/rails/work/activeresource/../activesupport/lib:test "/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/base_test.rb" "test/format_test.rb" "test/base_errors_test.rb" "test/observing_test.rb" "test/authorization_test.rb" "test/base/equality_test.rb" "test/base/custom_methods_test.rb" "test/base/load_test.rb" "test/connection_test.rb" (in /home/ci/.cruise/projects/rails/work/activeresource) Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader Started ...................................F............................................................................................................................ Finished in 1.989839 seconds. 1) Failure: test_recursively_loaded_collections(BaseLoadTest) [./test/base/load_test.rb:138:in test_recursively_loaded_collections' /usr/local/lib/ruby/gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:insend' /usr/local/lib/ruby/gems/1.8/gems/mocha-0.9.7/lib/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in run']: expected to be kind_of? but was .

    @@

    This test started failing after this commit. The reason why this test wasn't failing on most of the machines of bugmash participants, as they all probably were 32-bit. However this fails consistently on 64bit machine. Test was assuming that "1234567890" is Bignum. however its "Fixnum" on 64 bit machines.

    I've attached a patch(for master) with a simple fix to verify if the value is kind_of?(Numeric) instead of Fixnum or Bignum.

  • CancelProfileIsBroken

    CancelProfileIsBroken August 14th, 2009 @ 01:20 PM

    • Assigned user set to “Pratik”
  • Jatinder Singh

    Jatinder Singh August 14th, 2009 @ 01:20 PM

    • Assigned user cleared.
    • Tag changed from active_resource, tests to active_resource, ci, tests
  • Jatinder Singh

    Jatinder Singh August 14th, 2009 @ 01:23 PM

    • Assigned user set to “Pratik”
  • Jatinder Singh

    Jatinder Singh August 14th, 2009 @ 11:54 PM

    • Tag changed from active_resource, ci, tests to active_resource, ci, patch, tests
  • Matt Duncan

    Matt Duncan August 15th, 2009 @ 12:44 AM

    Patch applies cleanly to master and makes test pass after patch on 64-bit Ubuntu. The default ruby install on OS X is 32-bit I believe which is probably another reason this one slipped through the cracks.

  • Repository

    Repository August 15th, 2009 @ 08:29 PM

    • State changed from “new” to “resolved”

    (from [a363dba790d9d9f6284f7f857d872eca124805ee]) Fix ActiveResource load test for 64bit machines [#3051 state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com
    http://github.com/rails/rails/commit/a363dba790d9d9f6284f7f857d872e...

  • Repository

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Referenced by

Pages