This project is archived and is in readonly mode.
Rails 2.3.8: breaks Selenium test
-
Jeff Kreeftmeijer
Could you show us the code and explain how to reproduce it?
-
TMorgan99
Not much to add, really.
The app is available from pragprog,http://media.pragprog.com/titles/achbd/code/achbd-code.tgz
unzip the folder 'automated_browser/01'Then, I have added a Gemfile to specify my gems ...
# A sample Gemfile # Not *used* by Rails 2.3, but used by 'bundle install' to prep the gems manually source :gemcutter gem "rails", '2.3.5' gem "sqlite3-ruby", :require => 'sqlite3' gem 'rake' gem 'rspec' gem 'rspec-rails' gem 'cucumber' gem 'cucumber-rails' gem 'database_cleaner' gem 'nokogiri' gem 'webrat' gem 'mongrel' gem 'selenium-client'$ bundle install $ rake db:migrate db:test:prepare cucumberTest runs ok.
Now change gemfile to rails '2.3.8'
Change RAILS_GEM_VERSION in ./config/environment.rb$ bundle install $ rake cucumberTest fails on timeout
-
TMorgan99
I have traced this a bit further.
I used a cucumber enabled git bisect search to find the point of failure.It appears that the problem is the upgrading to rack 1.1.0
If I reverse this patch
my test runs again.patch -p1 -R < 0001-rack-dependency-bumped-to-110-tests-passing.patch
But I am not sure why.What were the tests that were passing here, so I could add my failing test to them?
-
TMorgan99
- State changed from new to resolved
- Assigned user set to josh
git bisect search finds this commit in rails...
74206aeff2b6a960612a820ec47e91ef9b778262 is first bad commit commit 74206aeff2b6a960612a820ec47e91ef9b778262 Author: Rizwan Reza <rizwanreza@gmail.com> Date: Sun May 16 23:40:17 2010 +0430 Rack dependency bumped to 1.1.0, tests passing. [#3558 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>further git bisect searching within rack leads to this ...
commit 8f836f406ca10274c6465e17c2b5646257a8412b Author: Eric Wong <normalperson@yhbt.net> Date: Thu Dec 10 21:34:17 2009 -0600
avoid HeaderHash#to_hash in middlewares Since HeaderHash objects are valid header responses, avoid converting the headers to Hash objects only to have it reconverted back to HeaderHash in the next middleware. Signed-off-by: Joshua Peek <josh@joshpeek.com>
I have opened a ticket on Rack
http://rack.lighthouseapp.com/projects/22435-rack/tickets/99-rack-1...
I suppose the tests in rack were insufficient?
-
TMorgan99
oops - it seemed that I have inadvertently resolved this issue.
If I reverse the commit in rack, I can run my test successfully.It appear that subsequent middlewares were not advised as to this change, and will fail if they were relying on
the .to_hash call -
Jeremy Kemper
- State changed from resolved to open
-
Santiago Pastorino
- Importance changed from to Low
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale