Forum: RSpec Cucmber: Mysql::Error: query: not connected: ROLLBACK

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
556fa76457d930880bea41a80a848867?d=identicon&s=25 Martin No (html-kurs)
on 2009-04-19 21:05
(Received via mailing list)
Hi,

I ran in trouble with unexpected rollbacks using cucumber 0.3.0.

My feature-file looks like

   Scenario: Create Valid Item
     Given I start

and the step is
   Given /^I start$/ do
     get "/items"
   end

In my log/test.log I get
   SQL (0.2ms)   SET NAMES 'utf8'
   SQL (0.2ms)   SET SQL_AUTO_IS_NULL=0
   SQL (0.1ms)   BEGIN


Processing ItemsController#index (for 127.0.0.1 at 2009-04-19 20:54:08)
[GET]
   Item Load (0.2ms)   SELECT * FROM `items`
Rendering template within layouts/application
Rendering items/index
Completed in 41ms (View: 30, DB: 1) | 200 OK
[http://www.example.com/items]
   SQL (0.0ms)   Mysql::Error: query: not connected: ROLLBACK




If using my browser directing it at /items in the test-environment I get

   SQL (0.3ms)   SET NAMES 'utf8'
   SQL (0.2ms)   SET SQL_AUTO_IS_NULL=0


Processing ItemsController#index (for 192.168.192.1 at 2009-04-19
20:55:07) [GET]
   Item Load (0.3ms)   SELECT * FROM `items`
Rendering template within layouts/application
Rendering items/index
Completed in 35ms (View: 23, DB: 1) | 200 OK
[http://192.168.192.25/items]

(see also http://www.pastie.org/451600 for the logs)

Any idea what causes the error?

TIA,
Martin
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-19 22:31
(Received via mailing list)
On Sun, Apr 19, 2009 at 8:56 PM, Martin <html-kurs@gmx.de> wrote:

> Hi,
>
> I ran in trouble with unexpected rollbacks using cucumber 0.3.0.
>

Probably the same issue as this:
https://rspec.lighthouseapp.com/projects/16211/tic...

I haven't found a solution yet, but I'm working on it. I could use some
help
to speed it up.

Aslak
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-19 23:01
(Received via mailing list)
On Sun, Apr 19, 2009 at 10:16 PM, aslak hellesoy
<aslak.hellesoy@gmail.com>wrote:

> 
https://rspec.lighthouseapp.com/projects/16211/tic...
>>  Scenario: Create Valid Item
>>  SQL (0.1ms)   BEGIN
>>
>> 20:55:07) [GET]
>
See my recent comment about config.cache_classes in the issue I
mentioned
above.

Did you change your test.rb to use
config.cache_classes = false
?

Can I see your test.rb?

Aslak
556fa76457d930880bea41a80a848867?d=identicon&s=25 Martin No (html-kurs)
on 2009-04-20 21:11
(Received via mailing list)
Hi Aslkak,

> Did you change your test.rb to use
> config.cache_classes = false
> ?

you're right, I changed it because of rspec-server. Now I found the hint
on
http://wiki.github.com/dchelimsky/rspec/spec_serve...
that it breaks cucumber...

Thanks,
Martin
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-04-20 21:18
(Received via mailing list)
On Mon, Apr 20, 2009 at 9:07 PM, Martin <html-kurs@gmx.de> wrote:

> Hi Aslkak,
>

I have been called many things, but never that.


>
The bug is here:
https://rspec.lighthouseapp.com/projects/16211-cuc...

Aslak
This topic is locked and can not be replied to.