Commit 317c3bd1 authored by Vincent Pelletier's avatar Vincent Pelletier

testListBox: Make timeout test failures easier to debug.

parent a43e825d
...@@ -770,8 +770,9 @@ class TestListBox(ERP5TypeTestCase): ...@@ -770,8 +770,9 @@ class TestListBox(ERP5TypeTestCase):
'ERP5TypeTestCase:', 'ERP5TypeTestCase:',
) )
self.assertEqual(result.getStatus(), 500) self.assertEqual(result.getStatus(), 500)
self.assertTrue('Error Type: TimeoutReachedError' in result.getBody()) body = result.getBody()
self.assertTrue('Error Value: 1969: Query execution was interrupted (max_statement_time exceeded): SET STATEMENT' in result.getBody()) self.assertIn('Error Type: TimeoutReachedError', body)
self.assertIn('Error Value: 1969: Query execution was interrupted (max_statement_time exceeded): SET STATEMENT', body)
def test_zodb_timeout(self): def test_zodb_timeout(self):
portal = self.getPortal() portal = self.getPortal()
...@@ -808,7 +809,7 @@ return context.objectValues() ...@@ -808,7 +809,7 @@ return context.objectValues()
'ERP5TypeTestCase:', 'ERP5TypeTestCase:',
) )
self.assertEqual(result.getStatus(), 500) self.assertEqual(result.getStatus(), 500)
self.assertTrue('Error Type: TimeoutReachedError' in result.getBody()) self.assertIn('Error Type: TimeoutReachedError', result.getBody())
def test_suite(): def test_suite():
suite = unittest.TestSuite() suite = unittest.TestSuite()
......
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