Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

ActiveResource#load test fails on 64 bit machines

#3051

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.

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

State: resolved
Milestone: none
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Jatinder Singh
    Jatinder Singh

    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.

    August 14th, 2009 @ 01:16 PM

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

    August 14th, 2009 @ 01:20 PM

  4. Jatinder Singh
    Jatinder Singh
    • Assigned user set to Pratik

    August 14th, 2009 @ 01:23 PM

  5. Jatinder Singh
    Jatinder Singh
    • Tag changed from active_resource, ci, tests to active_resource, ci, patch, tests

    August 14th, 2009 @ 11:54 PM

  6. Matt Duncan
    Matt Duncan

    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.

    August 15th, 2009 @ 12:44 AM

  7. Repository
  8. Repository