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.

Rails 2.3.8: breaks Selenium test

#4714

Not sure where in the stack this is happening.

I am running the example from the RSpec book, 'automated_browser/01'

I runs with Rails 2.3.5, but it times out in 2.3.8.

The only change I made was the RAILS_GEM_VERSION declaration

Reported by TMorgan99 · May 27th, 2010 @ 05:25 PM

State: stale
Milestone: none
Assigned to: josh josh
Importance: Low

Activity

  1. Jeff Kreeftmeijer
    Jeff Kreeftmeijer

    Could you show us the code and explain how to reproduce it?

    May 27th, 2010 @ 05:28 PM

  2. TMorgan99
    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  cucumber
    

    Test runs ok.

    Now change gemfile to rails '2.3.8'
    Change RAILS_GEM_VERSION in ./config/environment.rb

    $ bundle install
    $ rake cucumber
    

    Test fails on timeout

    May 27th, 2010 @ 06:26 PM

  3. TMorgan99
    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

    patch -p1 -R <  0001-rack-dependency-bumped-to-110-tests-passing.patch
    
    my test runs again.
    But I am not sure why.

    What were the tests that were passing here, so I could add my failing test to them?

    May 31st, 2010 @ 11:30 PM

  4. TMorgan99
    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 &lt;josh@joshpeek.com&gt;
    
    
    
    

    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?

    June 1st, 2010 @ 12:59 AM

  5. TMorgan99
    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

    June 1st, 2010 @ 11:00 PM

  6. Jeremy Kemper
    Jeremy Kemper
    • State changed from resolved to open

    June 22nd, 2010 @ 08:14 PM

  7. Santiago Pastorino
    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.

    February 2nd, 2011 @ 05:01 PM

  8. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 05:02 PM

  9. bingbing