Getting webrat integration tests to use database for session storage.

1 view
Skip to first unread message

jocmaff

unread,
Sep 21, 2009, 8:16:23 PM9/21/09
to webrat
I'm having a lot of trouble with webrat while upgrading from Rails
2.2.2 to 2.3.4

I get this error running the integration tests: (session is too big
for the cookie 4kb)
ActionController::Session::CookieStore::CookieOverflow:
ActionController::Session::CookieStore::CookieOverflow

Under 2.2.2 we added this to our environment/test.rb as I've seen
posted in various places.
# without this the integration tests end up using CookieStore and
getting an overflow error
ActionController::RackRequest::DEFAULT_SESSION_OPTIONS.
update(:database_manager => CGI::Session::MemoryStore)

This no longer works in 2.3.4 and I can't seem to get the integration
tests to not use the cookie for storage.

Any thoughts? besides the fact that we shouldn't be storing complex
objects or more than 4k of data in the sessions?

Thanks

Bernie

unread,
Sep 28, 2009, 2:55:08 PM9/28/09
to webrat
+1

I'm experiencing the exact same thing. anyone have any ideas?

On Sep 21, 8:16 pm, jocmaff <tippingpi...@gmail.com> wrote:
> I'm having a lot of trouble with webrat while upgrading from Rails
> 2.2.2 to 2.3.4
>
> I get this error running the integration tests: (session is too big
> for thecookie4kb)
> ActionController::Session::CookieStore::CookieOverflow:
> ActionController::Session::CookieStore::CookieOverflow
>
> Under 2.2.2 we added this to our environment/test.rb as I've seen
> posted in various places.
> # without this the integration tests end up using CookieStore and
> getting an overflow error
> ActionController::RackRequest::DEFAULT_SESSION_OPTIONS.
>       update(:database_manager => CGI::Session::MemoryStore)
>
> This no longer works in 2.3.4 and I can't seem to get the integration
> tests to not use thecookiefor storage.

jocmaff

unread,
Oct 8, 2009, 6:37:29 PM10/8/09
to webrat
I switched to using :active_record_store for sessions.

I was using the SqlSession store plugin (MySQL) specifically but it
was causing it's own issues. When I switched to
the :active_record_store my tests started passing again.

On Sep 28, 7:55 pm, Bernie <btel...@gmail.com> wrote:
> +1
>
> I'm experiencing the exact same thing. anyone have any ideas?
>
> On Sep 21, 8:16 pm, jocmaff <tippingpi...@gmail.com> wrote:
>
> > I'm having a lot of trouble withwebratwhile upgrading from Rails
Reply all
Reply to author
Forward
0 new messages