Skip to content

Commit eb83b69

Browse files
committed
OXDEV-351 Fix AcceptanceTestCase
Two things were fixed: - setUp calls parent::setUp() now - a test run is only repeated, if there was an AssertionFailedError thrown. in any other case the test run is not repeated in order to fail as soon as possible and get more information about the underlying error.
1 parent bcf08c1 commit eb83b69

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

library/AcceptanceTestCase.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ public function __construct($name = null, array $data = array(), $dataName = '')
112112
*/
113113
protected function setUp()
114114
{
115+
parent::setUp();
116+
115117
$this->selectedFrame = 'relative=top';
116118
$this->currentMinkDriver = $this->_blDefaultMinkDriver;
117119
$this->selectedWindow = null;
@@ -1846,11 +1848,14 @@ protected static function _clearString($sToClear)
18461848
*/
18471849
protected function onNotSuccessfulTest(Exception $exception)
18481850
{
1849-
if ($this->retryTimesLeft > 0) {
1851+
if ($exception instanceof AssertionFailedError &&
1852+
$this->retryTimesLeft > 0
1853+
) {
18501854
$this->retryTimesLeft--;
18511855
$this->stopMinkSession();
18521856
$this->setUpTestsSuite($this->getSuitePath());
18531857
$this->runBare();
1858+
18541859
return;
18551860
}
18561861

0 commit comments

Comments
 (0)