Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

  • Blog Navigation
Standup 12/23/08


  • Functional tests running slowly after upgrade to Rails 2.2

A project upgraded to Rails 2.2 which was previously able to complete its functional suite in under 300 seconds now takes a leisurely 6000 seconds to finish. Speculation about possible causes is welcomed. Meanwhile, I suspect ghosts.

UPDATE: apparently the functional tests were running slow due to memory swappage (the memory swappage, in turn, caused by ghosts, no doubt).

Interesting Things

  • Rails 2.2 may break Selenium tests

Rails 2.2 continues its reign of terror by using ‘secure’ HTTP-only cookies by default that cannot be read or set via javascript. This can cause selenium tests that attempt to logout by deleting the client-side session cookie to fail. The fix is simple enough; add :session_http_only => false in the config.action_controller.session hash in environment.rb. Or, to simply turn it off for your testing environment (which means you’ll still get the benefit of secure cookies in production), you can add ActionController::Base.session_options[:session_http_only] = false in your test.rb file. Alternatively, you can add explicit logout calls to your selenium tests, but expect these to add considerable time to your selenium suite.

  • FixtureScenarios and slow test suites

A pivot installed FixtureScenarios on a project and found that the addition of the plugin alone (with no configured fixtures) doubled the time the project’s test suites took to complete. FixtureScenarios are now dead to Adam. Dead!

  • No Pivotal Breakfast tomorrow

Karen Tsui and Ling-Wen Chang tirelessly prepare the world-famous Pivotal breakfast each day and generally make the San Francisco office an awesome place to work. They’re finally taking a much deserved break tomorrow, so now is a wonderful time to publicly recognize their much appreciated work. Thanks, and happy holidays!

  1. Joseph Palermo says:

    The functional tests problem turned out to be massive swapping on our CI box (the tests were running on dev boxes just fine). So apparently 2.2 uses a bit more memory, although our CI box was probably pretty close to the edge already.

  2. John W. Long says:

    Speaking of fixtures, you might give dataset a try:

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *

Share This