# HG changeset patch # User Sylvain Thénault # Date 1317293728 -7200 # Node ID 9454b7ef5ae48f2c46b9ac1a998918e09974232c # Parent 35d2e2f4e10aafc8bd76578ca747f656ab940814 [ms, test] propagate exception in test mode diff -r 35d2e2f4e10a -r 9454b7ef5ae4 server/repository.py --- a/server/repository.py Thu Sep 29 12:55:20 2011 +0200 +++ b/server/repository.py Thu Sep 29 12:55:28 2011 +0200 @@ -1152,6 +1152,8 @@ session.execute(rql, {'x': eid, 'seid': scleanup}, build_descr=False) except Exception: + if self.config.mode == 'test': + raise self.exception('error while cascading delete for entity %s ' 'from %s. RQL: %s', entity, sourceuri, rql) self.system_source.delete_info_multi(session, [entity], sourceuri) @@ -1182,6 +1184,8 @@ try: session.execute(rql, {'seid': scleanup}, build_descr=False) except Exception: + if self.config.mode == 'test': + raise self.exception('error while cascading delete for entity %s ' 'from %s. RQL: %s', entities, sourceuri, rql) self.system_source.delete_info_multi(session, entities, sourceuri) diff -r 35d2e2f4e10a -r 9454b7ef5ae4 server/sources/pyrorql.py --- a/server/sources/pyrorql.py Thu Sep 29 12:55:20 2011 +0200 +++ b/server/sources/pyrorql.py Thu Sep 29 12:55:28 2011 +0200 @@ -289,6 +289,8 @@ repo.delete_info(session, entity, self.uri, scleanup=self.eid) except Exception: + if self.repo.config.mode == 'test': + raise self.exception('while updating %s with external id %s of source %s', etype, extid, self.uri) continue