Every repository with this icon (
Every repository with this icon (
| Description: | Makes unit tests of a Rails application run instantly edit |
-
Tests run successfully for the first attempt but completely fail on the second
3 comments Created 8 months ago by mwilliamsI setup the RailsTestServer successfully and have it running on my command line. The first attempt to run a functional test from TextMate yielded a 13 second or so test run, which is normal. When running again, every single test fails. Here's the output from my console.
Test server starting [#4020]... (14 ms)
CTRL+C: Stop the server
CTRL+Z: Reset database column information cache
CTRL+`: Reset lazy-loaded constants
test/functional/owners_controller_test.rb (13896 ms)
test/functional/owners_controller_test.rb (3755 ms)
Resetting database column information cache... (2 ms)
test/functional/owners_controller_test.rb (3174 ms)Rails 2.3.2
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.5.1]
Gems:
- [F] openobject - [I] core = 2.0.0 - [F] gravtastic - [F] rest-client - [F] ar-extensions - [R] activerecord >= 1.14.1 - [F] daemons - [F] ezcrypto - [F] facebooker - [ ] hoe = 1.12.1 - [ ] rubyforge = 1.0.3 - [I] rake = 0.8.4 - [F] fastercsv - [R] fast_xs = 0.7 - [F] flickraw - [I] json = 1.1.4 - [F] google-geo - [F] plist - [F] rexml-expansion-fix - [F] right_aws - [F] right_http_connection = 1.2.4 - [F] right_http_connection - [F] ruby-openid - [F] simple-rss
- [F] solr-ruby - [F] twitter4r - [I] json = 1.1.4 - [F] uuidtoolsAny thoughts?
Comments
-
I have an app on 2.3.2. I don't really know what to make of this, but when I try to run tests, this happens:
ra:~/ROOT$ ruby test/unit/b_test.rb
(drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/plugins/acts_as_paranoid/init.rb:4:inbelongs_to_without_deleted': stack level too deep (SystemStackError) from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/plugins/acts_as_paranoid/init.rb:4:inbelongs_to_without_deleted' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/plugins/acts_as_paranoid/init.rb:4:inbelongs_to' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/app/models/r_base.rb:4 from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_without_new_constant_marking' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_file' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:inload_file' from (drbunix:tmp/sockets/test_server.sock) /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:inrequire_or_load' ... 52 levels... from ./test/unit/test_helper.rb:1:inrequire' from ./test/unit/test_helper.rb:1 from test/unit/b_test.rb:1:inrequire' from test/unit/b_test.rb:1On the test server console side I see the standard output:
- Test server starting [#4280]...Curb not found. Using Net::HTTP. (7488 ms)
- CTRL+C: Stop the server
- CTRL+Z: Reset database column information cache
- CTRL+`: Reset lazy-loaded constants
test/unit/b_test.rb
If, however, I try to figure out what's wrong by putting a debugger call at line 4 of the acts_as_paranoid/init.rb, I get this:
INTERNAL ERROR!!! wrong argument type StringIO (expected File)
/Library/Ruby/Gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/interface.rb:112:inreadline' /Library/Ruby/Gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/interface.rb:112:inreadline' /Library/Ruby/Gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/interface.rb:62:inread_command' /Library/Ruby/Gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/processor.rb:246:inprocess_commands' /Library/Ruby/Gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/processor.rb:171:in__at_line' (eval):5:inat_line' (eval):3:insynchronize' (eval):3:inat_line' /Library/Ruby/Gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:54:inat_line' /[ROOT]/vendor/plugins/acts_as_paranoid/init.rb:4:inbelongs_to' /[ROOT]/app/models/r_base.rb:4 /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_without_new_constant_marking' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_file' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:inload_file' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:inrequire_or_load' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:inload_missing_constant' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:inconst_missing' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:inconst_missing' /[ROOT]/app/models/r_model.rb:21 /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_without_new_constant_marking' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:380:inload_file' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:379:inload_file' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:259:inrequire_or_load' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:inload_missing_constant' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:inconst_missing' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:inconst_missing' /[ROOT]/vendor/rails/activesupport/lib/active_support/inflector.rb:361:inconstantize' /[ROOT]/vendor/rails/activesupport/lib/active_support/inflector.rb:360:ineach' /[ROOT]/vendor/rails/activesupport/lib/active_support/inflector.rb:360:inconstantize' /[ROOT]/vendor/rails/activesupport/lib/active_support/core_ext/string/inflections.rb:162:inconstantize' /[ROOT]/vendor/gems/thoughtbot-shoulda-2.9.1/lib/shoulda/private_helpers.rb:17:inmodel_class' /[ROOT]/vendor/gems/thoughtbot-shoulda-2.9.1/lib/shoulda/active_record/macros.rb:506:inshould_have_index' ./test/unit/b_test.rb:5 /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload_without_new_constant_marking' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' /[ROOT]/vendor/rails/activesupport/lib/active_support/dependencies.rb:145:inload' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:121:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/client.rb:10:indisable' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:121:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:80:infix_objectspace_collector' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:120:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:31:incapture_testrunner_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:51:inset_default_testrunner_stream' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:31:incapture_testrunner_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:119:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:23:incapture_standard_stream' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:118:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:23:incapture_standard_stream' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:117:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/cleaner.rb:22:inclean_up_around' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:116:incapture_test_result' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:96:inperform_run' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:13:inlog' /[ROOT]/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:10:inrealtime' /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:12:inlog' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:95:inperform_run' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:18:inrun' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:16:insynchronize' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:16:inrun' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1555:insend' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1555:inperform_without_block' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1515:inperform' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1589:inmain_loop' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1585:inloop' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1585:inmain_loop' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1581:instart' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1581:inmain_loop' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1430:inrun' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1427:instart' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1427:inrun' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1347:ininitialize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1627:innew' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/drb/drb.rb:1627:instart_service' /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:8:instart' /Users/ryan/rails-test-serving/lib/rails_test_serving/bootstrap.rb:53:instart_server' /Users/ryan/rails-test-serving/lib/rails_test_serving/bootstrap.rb:7:inboot'(Note that I am including rails-test-server from my home directory, because the latest gem does not incorporate the latest commit which is required for Rails 2.3.2)
This gets printed out every for every test.
If I remove acts_as_paranoid, then the tests run fine the first time, and then every tests fails the second time around with errors like:
NoMethodError: undefined method `password=' for #<User:0x265b2e0>
./test/unit/../factories/factory_definitions.rb:196 ./test/unit/birthday_reminder_test.rb:28 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:122 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:80 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:120 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:31 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:51 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:31 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:119 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:23 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:118 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:23 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:117 /Users/ryan/rails-test-serving/lib/rails_test_serving/cleaner.rb:22 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:116 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:96 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:13 /Users/ryan/rails-test-serving/lib/rails_test_serving/utilities.rb:12 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:95 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:18 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:16 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:16 /Users/ryan/rails-test-serving/lib/rails_test_serving/server.rb:8 /Users/ryan/rails-test-serving/lib/rails_test_serving/bootstrap.rb:53 /Users/ryan/rails-test-serving/lib/rails_test_serving/bootstrap.rb:7 test/test_helper.rb:7Which I believe is a reproduction of http://github.com/Roman2K/rails-test-serving/issues/#issue/1
I'm gonna keep messing with it a bit, but as of right now I have no idea what could be causing it.
Comments
Oh the formatting is atrocious. I can edit. Will do what I can.
It looks like acts_as_paranoid/init.rb is loaded twice, causing the
alias_method_chainto be called twice forActiveRecord::Base#belongs_to. As a consequence, whenbelongs_tois called, like in yourRBasemodel (I guess),belongs_toenters an infinite loop, which raises aSystemStackError.So the question is, how come
acts_as_paranoid/init.rbis loaded twice? Do youloadit explicitly somewhere in your code?
-
"Runs" but no assertions or tests are listed in the output
0 comments Created 6 months ago by knewterOur test suite, normally, takes ~10 minutes to run. Yes, it's slow.
Anyway, we're trying this out. It sort of works in that it lists all the tests appropriately and the server gets involved...it just doesn't actually run any tests.
NOTE: We're using shoulda, fwiw.
Output from rake test:
--(jadams@quadtopus)-(18/pts/3)-(1114/05-Jun-09)-- --($:~/rails/insight_card_services)(work)-- rake test (in /home/jadams/rails/insight_card_services) /usr/bin/ruby1.8 -I"/home/jadams/rails/insight_card_services/lib" -I"/home/jadams/rails/insight_card_services/test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/unit/card_inventory_entry_handler_test.rb" "test/unit/card_inventory_entry_test.rb" "test/unit/call_handler_result_test.rb" "test/unit/store_test.rb" "test/unit/agent_setting_test.rb" "test/unit/role_test.rb" "test/unit/card_load_report_test.rb" "test/unit/call_handler_log_entry_test.rb" "test/unit/card_creation_transaction_test.rb" "test/unit/store_user_test.rb" "test/unit/insight_test.rb" "test/unit/helpers/admin_base_helper_test.rb" "test/unit/helpers/audits_helper_test.rb" "test/unit/agent_mailer_test.rb" "test/unit/ip_address_test.rb" "test/unit/user_acknowledgement_test.rb" "test/unit/card_load_transaction_test.rb" "test/unit/agent_test.rb" "test/unit/fake_data_loader_test.rb" "test/unit/call_handler_test.rb" "test/unit/person_test.rb" "test/unit/announcement_test.rb" "test/unit/accounting_entry_test.rb" "test/unit/card_test.rb" "test/unit/nacha_test.rb" "test/unit/user_test.rb" Loaded suite test/test_helper
StartedFinished in 0.000354 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
/usr/bin/ruby1.8 -I"/home/jadams/rails/insight_card_services/lib" -I"/home/jadams/rails/insight_card_services/test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/functional/authenticated_test_helper_test.rb" "test/functional/announcements_controller_test.rb" "test/functional/home_page_controller_test.rb" "test/functional/stores_controller_test.rb" "test/functional/api/v1/card_loads_controller_test.rb" "test/functional/agent_admin/card_creation_transactions_controller_test.rb" "test/functional/agent_admin/agents_controller_test.rb" "test/functional/agent_admin/stores_controller_test.rb" "test/functional/agent_admin/cards_controller_test.rb" "test/functional/agent_admin/base_controller_test.rb" "test/functional/agent_admin/card_load_transactions_controller_test.rb" "test/functional/agent_admin/users_controller_test.rb" "test/functional/cards_controller_test.rb" "test/functional/sessions_controller_test.rb" "test/functional/admin/card_creation_transactions_controller_test.rb" "test/functional/admin/announcements_controller_test.rb" "test/functional/admin/card_inventory_entries_controller_test.rb" "test/functional/admin/audits_controller_test.rb" "test/functional/admin/call_handler_log_entries_controller_test.rb" "test/functional/admin/agents_controller_test.rb" "test/functional/admin/agent_settings_controller_test.rb" "test/functional/admin/stores_controller_test.rb" "test/functional/admin/nacha_files_controller_test.rb" "test/functional/admin/cards_controller_test.rb" "test/functional/admin/base_controller_test.rb" "test/functional/admin/card_load_transactions_controller_test.rb" "test/functional/admin/users_controller_test.rb" "test/functional/store_manager/base_controller_test.rb" "test/functional/store_manager/users_controller_test.rb" "test/functional/users_controller_test.rb" Loaded suite test/test_helper
StartedFinished in 0.00035 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
/usr/bin/ruby1.8 -I"/home/jadams/rails/insight_card_services/lib" -I"/home/jadams/rails/insight_card_services/test" "/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb" "test/integration/subdomain_param_test.rb" "test/integration/load_funds_test.rb" "test/integration/flag_lost_card_test.rb" "test/integration/back_button_test.rb" "test/integration/login_test.rb" "test/integration/mega_story_test.rb" "test/integration/system_messages_test.rb" "test/integration/card_inventory_test.rb" Loaded suite test/test_helper
StartedFinished in 0.000359 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
Loaded suite /usr/bin/rake
StartedFinished in 0.000637 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
--(jadams@quadtopus)-(19/pts/3)-(1117/05-Jun-09)-- --($:~/rails/insight_card_services)(work)-- script/about About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.2
Rails version 2.2.2
Active Record version 2.2.2
Action Pack version 2.2.2
Active Resource version 2.2.2
Action Mailer version 2.2.2
Active Support version 2.2.2
Application root /home/jadams/rails/insight_card_services
Environment development
Database adapter mysql
Database schema version 20090602190248
Loaded suite script/about
StartedFinished in 0.000387 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
output from server
--(jadams@quadtopus)-(28/pts/2)-(1112/05-Jun-09)-- --($:~/rails/insight_card_services)(work)-- ruby test/test_helper.rb --serve ** Test server starting [#1704]... (39 ms) - CTRL+C: Stop the server - CTRL+Z: Reset database column information cache - CTRL+`: Reset lazy-loaded constants z>> /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/unit/card_inventory_entry_handler_test.rb test/unit/card_inventory_entry_test.rb test/unit/call_handler_result_test.rb test/unit/store_test.rb test/unit/agent_setting_test.rb test/unit/role_test.rb test/unit/card_load_report_test.rb test/unit/call_handler_log_entry_test.rb test/unit/card_creation_transaction_test.rb test/unit/store_user_test.rb test/unit/insight_test.rb test/unit/helpers/admin_base_helper_test.rb test/unit/helpers/audits_helper_test.rb test/unit/agent_mailer_test.rb test/unit/ip_address_test.rb test/unit/user_acknowledgement_test.rb test/unit/card_load_transaction_test.rb test/unit/agent_test.rb test/unit/fake_data_loader_test.rb test/unit/call_handler_test.rb test/unit/person_test.rb test/unit/announcement_test.rb test/unit/accounting_entry_test.rb test/unit/card_test.rb test/unit/nacha_test.rb test/unit/user_test.rb (705 ms)
/usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/functional/authenticated_test_helper_test.rb test/functional/announcements_controller_test.rb test/functional/home_page_controller_test.rb test/functional/stores_controller_test.rb test/functional/api/v1/card_loads_controller_test.rb test/functional/agent_admin/card_creation_transactions_controller_test.rb test/functional/agent_admin/agents_controller_test.rb test/functional/agent_admin/stores_controller_test.rb test/functional/agent_admin/cards_controller_test.rb test/functional/agent_admin/base_controller_test.rb test/functional/agent_admin/card_load_transactions_controller_test.rb test/functional/agent_admin/users_controller_test.rb test/functional/cards_controller_test.rb test/functional/sessions_controller_test.rb test/functional/admin/card_creation_transactions_controller_test.rb test/functional/admin/announcements_controller_test.rb test/functional/admin/card_inventory_entries_controller_test.rb test/functional/admin/audits_controller_test.rb test/functional/admin/call_handler_log_entries_controller_test.rb test/functional/admin/agents_controller_test.rb test/functional/admin/agent_settings_controller_test.rb test/functional/admin/stores_controller_test.rb test/functional/admin/nacha_files_controller_test.rb test/functional/admin/cards_controller_test.rb test/functional/admin/base_controller_test.rb test/functional/admin/card_load_transactions_controller_test.rb test/functional/admin/users_controller_test.rb test/functional/store_manager/base_controller_test.rb test/functional/store_manager/users_controller_test.rb test/functional/users_controller_test.rb (651 ms) /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/integration/subdomain_param_test.rb test/integration/load_funds_test.rb test/integration/flag_lost_card_test.rb test/integration/back_button_test.rb test/integration/login_test.rb test/integration/mega_story_test.rb test/integration/system_messages_test.rb test/integration/card_inventory_test.rb (728 ms) /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/unit/card_inventory_entry_handler_test.rb test/unit/card_inventory_entry_test.rb test/unit/call_handler_result_test.rb test/unit/store_test.rb test/unit/agent_setting_test.rb test/unit/role_test.rb test/unit/card_load_report_test.rb test/unit/call_handler_log_entry_test.rb test/unit/card_creation_transaction_test.rb test/unit/store_user_test.rb test/unit/insight_test.rb test/unit/helpers/admin_base_helper_test.rb test/unit/helpers/audits_helper_test.rb test/unit/agent_mailer_test.rb test/unit/ip_address_test.rb test/unit/user_acknowledgement_test.rb test/unit/card_load_transaction_test.rb test/unit/agent_test.rb test/unit/fake_data_loader_test.rb test/unit/call_handler_test.rb test/unit/person_test.rb test/unit/announcement_test.rb test/unit/accounting_entry_test.rb test/unit/card_test.rb test/unit/nacha_test.rb test/unit/user_test.rb (768 ms) /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/functional/authenticated_test_helper_test.rb test/functional/announcements_controller_test.rb test/functional/home_page_controller_test.rb test/functional/stores_controller_test.rb test/functional/api/v1/card_loads_controller_test.rb test/functional/agent_admin/card_creation_transactions_controller_test.rb test/functional/agent_admin/agents_controller_test.rb test/functional/agent_admin/stores_controller_test.rb test/functional/agent_admin/cards_controller_test.rb test/functional/agent_admin/base_controller_test.rb test/functional/agent_admin/card_load_transactions_controller_test.rb test/functional/agent_admin/users_controller_test.rb test/functional/cards_controller_test.rb test/functional/sessions_controller_test.rb test/functional/admin/card_creation_transactions_controller_test.rb test/functional/admin/announcements_controller_test.rb test/functional/admin/card_inventory_entries_controller_test.rb test/functional/admin/audits_controller_test.rb test/functional/admin/call_handler_log_entries_controller_test.rb test/functional/admin/agents_controller_test.rb test/functional/admin/agent_settings_controller_test.rb test/functional/admin/stores_controller_test.rb test/functional/admin/nacha_files_controller_test.rb test/functional/admin/cards_controller_test.rb test/functional/admin/base_controller_test.rb test/functional/admin/card_load_transactions_controller_test.rb test/functional/admin/users_controller_test.rb test/functional/store_manager/base_controller_test.rb test/functional/store_manager/users_controller_test.rb test/functional/users_controller_test.rb (731 ms) /usr/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake/rake_test_loader.rb test/integration/subdomain_param_test.rb test/integration/load_funds_test.rb test/integration/flag_lost_card_test.rb test/integration/back_button_test.rb test/integration/login_test.rb test/integration/mega_story_test.rb test/integration/system_messages_test.rb test/integration/card_inventory_test.rb (786 ms)
Comments
-
I can start the server, but whenever I run a test I get the following failure from the server:
>> functional/contacts_controller_test.rb/Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:56:in `clean_up_app': undefined method `cleanup_application' for # (NoMethodError) from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:38:in `start_worker' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:35:in `loop' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:35:in `start_worker' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:33:in `initialize' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:33:in `new' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:33:in `start_worker' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/cleaner.rb:14:in `initialize' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/server.rb:54:in `new' ... 11 levels... from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/server.rb:9:in `start' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/bootstrap.rb:53:in `start_server' from /Users/lylo/.gem/ruby/1.8/gems/Roman2K-rails-test-serving-0.1.4.1/lib/rails_test_serving/bootstrap.rb:7:in `boot' from test/test_helper.rb:9Comments












Hi Matthew. Thanks for the report.
Also, if you can (though I doubt it will make a difference), you could try grabbing the source of RailsTestServing and building+installing the gem manually:
Thanks.
We get the same problem. The error comes from ActiveRecord not recognizing the schema anymore:
FIRST RUN:
Loaded suite test/test_helper
Started
[32m.[0m Finished in 3.15626 seconds.
[32m1 tests, 4 assertions, 0 failures, 0 errors[0m
SECOND RUN:
Loaded suite test/test_helper
Started
test_send_topic_alerts_new_and_should_send(AlertTest): ActiveRecord::StatementInvalid: PGError: ERROR: column "drug" of relation "drugdb_names" does not exist at character 37
[33mE[0m Finished in 1.887348 seconds.
1) [33mError[0m: test_send_topic_alerts_new_and_should_send(AlertTest):
ActiveRecord::StatementInvalid: PGError: ERROR: column "drug" of relation "drugdb_names" does not exist at character 37
: INSERT INTO "drugdb_names" ("name", "drug", "is_obsolete", "name_type_id", "id") VALUES (E'Advil', E'ibuprofen', 'f', 2, 2) method log in abstract_adapter.rb at line 188
method execute in postgresql_adapter.rb at line 503
Was there ever any resolution to this?
More info: if you comment out the line " ActionController::Dispatcher.cleanup_application" in cleaner.rb, method clean_up_app, it will work. So something about the cleanup_application method does something to prevent re-running.