Commit 61b17d34 authored by Jérome Perrin's avatar Jérome Perrin

software/erp5/{benchmarks,test}: breakpoint on errors when SLAPOS_TEST_DEBUG is true

parent ea21b1f6
...@@ -175,6 +175,8 @@ class TestOrderBuildPackingListSimulation( ...@@ -175,6 +175,8 @@ class TestOrderBuildPackingListSimulation(
params={'user_quantity:int': 1}) params={'user_quantity:int': 1})
if not ret.ok: if not ret.ok:
self.logger.error(ret.text) self.logger.error(ret.text)
if self._debug:
breakpoint()
ret.raise_for_status() ret.raise_for_status()
self._waitForActivities( self._waitForActivities(
timeout=datetime.timedelta(hours=2).total_seconds()) timeout=datetime.timedelta(hours=2).total_seconds())
...@@ -211,6 +213,8 @@ class TestOrderBuildPackingListSimulation( ...@@ -211,6 +213,8 @@ class TestOrderBuildPackingListSimulation(
) )
if not ret.ok: if not ret.ok:
self.logger.error(ret.text) self.logger.error(ret.text)
if self._debug:
breakpoint()
ret.raise_for_status() ret.raise_for_status()
self._waitForActivities( self._waitForActivities(
timeout=datetime.timedelta(hours=2).total_seconds()) timeout=datetime.timedelta(hours=2).total_seconds())
...@@ -241,5 +245,3 @@ class TestOrderBuildPackingListSimulation( ...@@ -241,5 +245,3 @@ class TestOrderBuildPackingListSimulation(
subprocess.check_output( subprocess.check_output(
(pt_query_digest, mariadb_slowquery_log), text=True) (pt_query_digest, mariadb_slowquery_log), text=True)
}) })
breakpoint()
...@@ -460,6 +460,8 @@ class ZopeSkinsMixin: ...@@ -460,6 +460,8 @@ class ZopeSkinsMixin:
pass pass
time.sleep(5) time.sleep(5)
else: else:
if cls._debug:
breakpoint()
raise AssertionError("Timeout waiting for activities") raise AssertionError("Timeout waiting for activities")
@classmethod @classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment