#271 open
Chad Woolley

Test suite broken in various ways

Reported by Chad Woolley | August 29th, 2009 @ 01:58 PM

The official CCRB CI build has not been running for quite a while, and as a consequence the test suite is not in good shape. This appears to have started around 7/1/09:


I dug into it some, but couldn't fix it. Here are the problems I found:

  1. The suite runs fine from command line, but hangs when it is run via CCRB
  2. ProjectTest fails in isolation
  3. BuilderIntegrationTest fails in isolation and as part of suite

Comments and changes to this ticket

  • Matt Duncan

    Matt Duncan September 6th, 2009 @ 01:47 PM

    The attached patch should fix up 2 of the 4 current failing tests on ProjectTest.

  • Matt Duncan

    Matt Duncan September 6th, 2009 @ 02:00 PM

    This patch should fix one more of the tests on ProjectTest.

  • Chad Woolley

    Chad Woolley September 7th, 2009 @ 11:53 AM

    • State changed from “new” to “open”

    Thanks Matt, those two are applied.

  • Chad Woolley

    Chad Woolley September 7th, 2009 @ 12:54 PM

    There is still inconsistent behavior between running 'rake' and running tests individually. I think I've tracked it down.

    The changes here (http://github.com/thoughtworks/cruisecontrol.rb/commit/11929ce55e22...) cause all plugins to be loaded all the time by all environments. The changes here (http://github.com/thoughtworks/cruisecontrol.rb/commit/11929ce55e22...) show that the list of plugins is a class method (which was always the case), and also shows some test specific code to ignore plugin loading in the test environment (which is a code smell).

    Anyway, this causes loaded plugins to "stick around" across tests - in the context of the full suite, different plugins eng up being loaded than in the context of a single test.

    Not sure what the best way to fix this is, but I'd like to see the class variable for loaded plugins go away, and turn into an instance variable somewhere. This may be hard, but would eliminate the test bleed-over, and need to special case disable plugin loading during the test environment.

    -- Chad

  • Brian Guthrie

    Brian Guthrie September 8th, 2009 @ 07:26 AM

    The previous behavior had plugins being loaded as soon as project.rb got eval'd by Ruby so I'm a bit surprised that this changes the behavior so drastically - I had essentially looked at this as a reorganization. Is it possible that simply moving the load_all behavior back into project.rb would at least go part of the way towards squaring it?

    Agreed that this is also an awkward way of performing plugin management. Perhaps moving the behavior into a dedicated (and reset-able) PluginLoader mechanism would help? Or can we leverage Rails' file reloading behavior? Will take a look.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป