This project is archived and is in readonly mode.
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:in
send'
/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 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 August 14th, 2009 @ 01:20 PM
- Assigned user set to Pratik
-
Jatinder Singh August 14th, 2009 @ 01:20 PM
- Assigned user cleared.
- Tag changed from active_resource, tests to active_resource, ci, tests
-
Jatinder Singh August 14th, 2009 @ 01:23 PM
- Assigned user set to Pratik
-
Jatinder Singh August 14th, 2009 @ 11:54 PM
- Tag changed from active_resource, ci, tests to active_resource, ci, patch, tests
-
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 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 August 15th, 2009 @ 08:30 PM
(from [dbc62ad225660453a6a955e507401504dffb8e20]) Fix ActiveResource load test for 64bit machines [#3051 state:resolved]
Signed-off-by: Pratik Naik pratiknaik@gmail.com
http://github.com/rails/rails/commit/dbc62ad225660453a6a955e5074015...
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>
People watching this ticket
Attachments
Tags
Referenced by
- 3051 ActiveResource#load test fails on 64 bit machines (from [a363dba790d9d9f6284f7f857d872eca124805ee]) Fix Act...
- 3051 ActiveResource#load test fails on 64 bit machines (from [dbc62ad225660453a6a955e507401504dffb8e20]) Fix Act...