Merge lp:~jml/testresources/adsorb-suite into lp:~lifeless/testresources/trunk

Proposed by Jonathan Lange
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jml/testresources/adsorb-suite
Merge into: lp:~lifeless/testresources/trunk
To merge this branch: bzr merge lp:~jml/testresources/adsorb-suite
Reviewer Review Type Date Requested Status
Robert Collins RFC Pending
Review via email: mp+1228@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

This branch makes the changes we discussed to adsorbSuite, deprecating it in favour of an addTest method that "distributes" the suite structure.

The more I think about this, the more I think we should have two methods: a regular addTest and a "distributive" addTest. Possible names include: absorbTest, inhaleTest, addTestDistributive, digestTest — basically anything that's not "adbsorb" :)

lp:~jml/testresources/adsorb-suite updated
105. By Jonathan Lange

Don't need iterate_tests any more.

106. By Jonathan Lange

Merge pyunit3k rename.

Revision history for this message
Robert Collins (lifeless) wrote :

Why?

Revision history for this message
Robert Collins (lifeless) wrote :

Missing some VWS in CustomSuite.

Other than that, I think this is heading in the right direction. The step that was missed was

'
- All of the tests in each of the resulting new SpecialSuites should have
- identical resource requirements so we can still optimise.
'

This part of the design isn't implemented, and until it is I can see custom suites causing significant resource flapping.

I guess its because of this flapping that you're concerned about this?

Concretely, addTest needs to set 'resources' on each split out CustomSuite, and should only partition the CustomSuite's members when their resource list is not homogeneous.

I hope this is more clear; I think I'd like to hold off merging this until we've done this part, because otherwise it may cause a performance regression.

Revision history for this message
Jonathan Lange (jml) wrote :

It's hard to articulate.

I think that people who just want to append a test to the suite should be able to do so, rather than having to do something like:
  ots = OptimisingTestSuite()
  ots.addTest(...)
  foo = TestFoo('foo')
  suite = TestSuite([ots, foo])

which achieves the same thing but is more cumbersome.

Revision history for this message
Robert Collins (lifeless) wrote :

On Sun, 2008-11-16 at 21:08 +0000, Jonathan Lange wrote:
> It's hard to articulate.
>
> I think that people who just want to append a test to the suite should be able to do so, rather than having to do something like:
> ots = OptimisingTestSuite()
> ots.addTest(...)
> foo = TestFoo('foo')
> suite = TestSuite([ots, foo])
>
> which achieves the same thing but is more cumbersome.

huh? addTest supports adding a test.

So of:
> ots = OptimisingTestSuite()
> ots.addTest(...)
> foo = TestFoo('foo')
> suite = TestSuite([ots, foo])

The first three lines are boilerplate needed either way; the last line should be
ots.addTest(foo)

no?

-Rob

--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Subscribers

People subscribed via source and target branches