2014-05-12 18:07 GMT+02:00 Cédric Krier <[email protected]>:
> On 12 May 18:00, Sergi Almacellas Abellana wrote:
>> El 12/05/14 17:28, Cédric Krier ha escrit:
>> >Hi,
>> >
>> >There is a problem with the new tests added to purchase (see
>> >http://tests.tryton.org/~test/postgresql.html).
>> >The test fails when running with account_stock_continental because this
>> >module add a constraint on product account stock.
>> We have this problem too with modules that add constraints to models, and
>> breaking more than one module, and we are trying to find a more generic
>> solution.
>> >I wrote a patch:http://codereview.tryton.org/13311003
>> >but I'm not sure it is the right way to go.
>> >An other possibility would be to remove the required of
>> >account_stock_continental for bad design reason (there are still the
>> >*_used which raise error message).
>> >
>> >What do you think?
>> I think it's better to make tests that doesn't take in account other
>> existing modules, so i will be better if we can get rid of the constraint.
>>
>> May dropping and recreating the db should do the trick?
>
> Running tests for 1 kind of database already takes 4 hours if we do what
> you suggest it will take about 2 weeks.

Maybe we could cache the database depending on module dependencies. That is:

Module B depends on A and module C also depends on A (but does not depend on B).

So after running tests of A we cache that database. When running B
tests we pick the database from cache and run the tests on it. When
running C tests we also pick the database from cache and run the tests
on it.



-- 
Albert Cervera i Areny
Tel. 93 553 18 03
@albertnan
www.NaN-tic.com

Reply via email to