Adam Byrtek
2008-Sep-02 23:57 UTC
[Cruisecontrolrb-users] Test database not purged after migrations
I''ve recently started to use CruiseControl.rb (version 1.3.0) for all our projects at Code Sprinters. Due to the way CC runs migrations I was forced to fix some old broken migrations, which I believe is a good thing. But I also encountered some strange hard to reproduce bugs during db:schema:load, which don''t occur when the tests are run manually. I found the answer in this blog post: http://abstractplain.net/blog/?p=1024 The problem is that CC invokes db:test:purge so it is not executed again during test task, as it should be. When I used a custom cruise tasks that ensures db:test:purge can be run again, all my projects were green again: http://abstractplain.net/blog/?p=1024#comment-39698 This quick and dirty fix helped, but I believe it is a general CruiseControl.rb problem that should be fixed, preferably in a more elegant way. To be true if there is a consensus on the list that this should be done, I''m willing to work on this. Excuse me if this has already been discussed, I''m new to the list. Best regards, Adam Byrtek
Chad Woolley
2008-Sep-03 05:36 UTC
[Cruisecontrolrb-users] Test database not purged after migrations
On Tue, Sep 2, 2008 at 4:57 PM, Adam Byrtek <adambyrtek at gmail.com> wrote:> This quick and dirty fix helped, but I believe it is a general > CruiseControl.rb problem that should be fixed, preferably in a more > elegant way. To be true if there is a consensus on the list that this > should be done, I''m willing to work on this.Sounds like it''s an issue, would be great to have it patched. I''m wondering, does the newer db:test:prepare task (since rails 2.x or so?) address these problems in a cleaner way? I''m pretty sure it is not backward compatible without older rails versions, though.
Matt Wynne
2008-Sep-03 07:33 UTC
[Cruisecontrolrb-users] Test database not purged after migrations
I''d also be happy to help with a patch - I wasted a couple of hours yesterday and I suspect it might have been due to the same thing. So are we saying this is a symptom of something Cruise does that ''breaks'' the way rake behaves? On 3 Sep 2008, at 00:57, Adam Byrtek wrote:> I''ve recently started to use CruiseControl.rb (version 1.3.0) for all > our projects at Code Sprinters. Due to the way CC runs migrations I > was forced to fix some old broken migrations, which I believe is a > good thing. But I also encountered some strange hard to reproduce bugs > during db:schema:load, which don''t occur when the tests are run > manually. I found the answer in this blog post: > http://abstractplain.net/blog/?p=1024 > > The problem is that CC invokes db:test:purge so it is not executed > again during test task, as it should be. When I used a custom cruise > tasks that ensures db:test:purge can be run again, all my projects > were green again: > http://abstractplain.net/blog/?p=1024#comment-39698 > > This quick and dirty fix helped, but I believe it is a general > CruiseControl.rb problem that should be fixed, preferably in a more > elegant way. To be true if there is a consensus on the list that this > should be done, I''m willing to work on this. > > Excuse me if this has already been discussed, I''m new to the list. > > Best regards, > Adam Byrtek > _______________________________________________ > Cruisecontrolrb-users mailing list > Cruisecontrolrb-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/cruisecontrolrb-users