OntoWiki icon indicating copy to clipboard operation
OntoWiki copied to clipboard

non-deterministic controller tests

Open jbrekle opened this issue 13 years ago • 1 comments

i get alternating test results when running phpunit on OntoWiki level.

3 cases cycle...

first case:

There was 1 failure:

  1. IndexControllerTest::testEmptyAction Failed asserting last controller used <"error"> was "index"

/home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/ControllerTestCase.php:1000 /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:116

second case

There were 2 errors:

  1. IndexControllerTest::testNoControllerAndActionDefaultToNewsAction PHP_Invoker_TimeoutException: Execution aborted after 1 second

  2. IndexControllerTest::testMessagesActionSingleMessage PHP_Invoker_TimeoutException: Execution aborted after 1 second

/home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/Constraint/DomQuery.php:174 /home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/ControllerTestCase.php:336 /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:139

There was 1 failure:

  1. IndexControllerTest::testEmptyAction Failed asserting last controller used <"error"> was "index"

/home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/ControllerTestCase.php:1000 /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:116

third case

...........................................PHP Fatal error: Method Zend_View_Helper_InlineScript::__toString() must not throw an exception in /home/jonas/programming/php-workspace/ow/application/views/templates/layouts/layout.phtml on line 94 PHP Stack trace: PHP 1. {main}() /usr/bin/phpunit:0 PHP 2. PHPUnit_TextUI_Command::main($exit = uninitialized) /usr/bin/phpunit:46 PHP 3. PHPUnit_TextUI_Command->run($argv = array (0 => '/usr/bin/phpunit'), $exit = TRUE) /usr/share/php/PHPUnit/TextUI/Command.php:130 PHP 4. PHPUnit_TextUI_TestRunner->doRun($suite = class PHPUnit_Framework_TestSuite { protected $backupGlobals = FALSE; protected $backupStaticAttributes = NULL; protected $name = 'OntoWiki'; protected $groups = array (...); protected $tests = array (...); protected $numTests = 67; protected $testCase = FALSE }, $arguments = array ('listGroups' => FALSE, 'loader' => NULL, 'useDefaultConfiguration' => TRUE, 'configuration' => '/home/jonas/programming/php-workspace/ow/phpunit.xml.dist')) /usr/share/php/PHPUnit/TextUI/Command.php:192 PHP 5. PHPUnit_Framework_TestSuite->run($result = class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }, $filter = FALSE, $groups = array (), $excludeGroups = array (), $processIsolation = FALSE) /usr/share/php/PHPUnit/TextUI/TestRunner.php:325 PHP 6. PHPUnit_Framework_TestSuite->run($result = class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }, $filter = FALSE, $groups = array (), $excludeGroups = array (), $processIsolation = FALSE) /usr/share/php/PHPUnit/Framework/TestSuite.php:705 PHP 7. PHPUnit_Framework_TestSuite->runTest($test = class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }, $result = class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }) /usr/share/php/PHPUnit/Framework/TestSuite.php:745 PHP 8. PHPUnit_Framework_TestCase->run($result = class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }) /usr/share/php/PHPUnit/Framework/TestSuite.php:772 PHP 9. PHPUnit_Framework_TestResult->run($test = class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }) /usr/share/php/PHPUnit/Framework/TestCase.php:751 PHP 10. PHP_Invoker->invoke($callable = array (0 => class IndexControllerTest { ... }, 1 => 'runBare'), $arguments = array (), $timeout = 1) /usr/share/php/PHPUnit/Framework/TestResult.php:647 PHP 11. call_user_func_array(array (0 => class IndexControllerTest { ... }, 1 => 'runBare'), array ()) /usr/share/php/PHP/Invoker.php:93 PHP 12. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHP/Invoker.php:0 PHP 13. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804 PHP 14. ReflectionMethod->invokeArgs(class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }, array ()) /usr/share/php/PHPUnit/Framework/TestCase.php:942 PHP 15. IndexControllerTest->testNoControllerAndActionDefaultToNewsAction() /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:0 PHP 16. Zend_Test_PHPUnit_ControllerTestCase->dispatch($url = '/') /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:65 PHP 17. Zend_Application->run() /home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/ControllerTestCase.php:206 PHP 18. Zend_Application_Bootstrap_Bootstrap->run() /home/jonas/programming/php-workspace/ow/libraries/Zend/Application.php:366 PHP 19. Zend_Controller_Front->dispatch($request = uninitialized, $response = uninitialized) /home/jonas/programming/php-workspace/ow/libraries/Zend/Application/Bootstrap/Bootstrap.php:97 PHP 20. Zend_Controller_Plugin_Broker->postDispatch($request = class Zend_Controller_Request_HttpTestCase { protected $_headers = array (...); protected $_method = 'GET'; protected $_rawBody = NULL; protected $_validMethodTypes = array (...); protected $_paramSources = array (...); protected $_requestUri = '/'; protected $_baseUrl = ''; protected $_basePath = NULL; ... }) /home/jonas/programming/php-workspace/ow/libraries/Zend/Controller/Front.php:965 PHP 21. Zend_Layout_Controller_Plugin_Layout->postDispatch($request = class Zend_Controller_Request_HttpTestCase { protected $_headers = array (...); protected $_method = 'GET'; protected $_rawBody = NULL; protected $_validMethodTypes = array (...); protected $_paramSources = array (...); protected $_requestUri = '/'; protected $_baseUrl = ''; protected $_basePath = NULL; ... }) /home/jonas/programming/php-workspace/ow/libraries/Zend/Controller/Plugin/Broker.php:333 PHP 22. Zend_Layout->render($name = uninitialized) /home/jonas/programming/php-workspace/ow/libraries/Zend/Layout/Controller/Plugin/Layout.php:143 PHP 23. Zend_View_Abstract->render($name = 'layout.phtml') /home/jonas/programming/php-workspace/ow/libraries/Zend/Layout.php:796 PHP 24. Zend_View->_run('/home/jonas/programming/php-workspace/ow/application/views/templates/layouts/layout.phtml') /home/jonas/programming/php-workspace/ow/libraries/Zend/View/Abstract.php:888 PHP 25. include() /home/jonas/programming/php-workspace/ow/libraries/Zend/View.php:108

OntoWiki — News
<link rel="shortcut icon" type="image/x-icon" href="http://localhost/favicon.png" />

        <script type="text/javascript">

        var urlBase = "http://localhostTestHelper.php/";
        var themeUrlBase = "http://localhost/extensions/themes/silverblue/";
        var _OWSESSION = "ONTOWIKIow2";
        var RDFAUTHOR_BASE = "http://localhost/libraries/RDFauthor/";
        var RDFAUTHOR_VIEW_MODE = "inline";
        var RDFAUTHOR_DEBUG = 1;        </script>


<!-- ontowiki stylesheets -->
<link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/default.css" type="text/css" media="screen" />
<!-- link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/legacy.css" type="text/css" media="screen" / -->
<link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/clickmenu.css" type="text/css" media="screen" />
<link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/jquery-ui.css" type="text/css" media="screen" />

    <!-- developer styles, e.g. for deprecated and legacy gui elements -->
<link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/default.dev.css" type="text/css" media="screen" />
<link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/deprecated.dev.css" type="text/css" media="screen" />
<!-- link rel="stylesheet" href="http://localhost/extensions/themes/silverblue/styles/legacy.dev.css" type="text/css" media="screen" / -->

<!-- IE conditional stylesheets -->
<!--[if IE 7]><link rel="stylesheet" media="screen" href="http://localhost/extensions/themes/silverblue/styles/default.ie7.css" /><![endif]-->

<!-- dynamic styles -->

<!-- jQuery -->
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery-ui.js"></script>

<!-- included js libraries -->
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.json.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.livequery.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.clickmenu.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.simplemodal.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.tablesorter.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/libraries/jquery.rdfquery.rdfa-1.0.js"></script>

<!-- RDFa widgets -->
<!--script type="text/javascript" id="RDFauthorScript" src="http://localhost/libraries/RDFauthor/src/rdfauthor.js"></script-->

<!-- ontowiki js -->
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/main.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/support.js"></script>
<script type="text/javascript" src="http://localhost/extensions/themes/silverblue/scripts/jquery.ontowiki.js"></script>

<!-- dynamic js -->
<script type="text/javascript">
    // get body element
    var body = document.body;
    var bodyClass = body.className;
    // set javascript = on
    bodyClass = bodyClass.replace(/javascript-off/g, "javascript-on");
    // set application in processing state
    bodyClass = bodyClass + " is-processing";
    // process changes
    body.setAttribute("class", bodyClass, 0);
</script>

Fatal error: Method Zend_View_Helper_InlineScript::__toString() must not throw an exception in /home/jonas/programming/php-workspace/ow/application/views/templates/layouts/layout.phtml on line 94

Call Stack: 0,0002 638360 1. {main}() /usr/bin/phpunit:0 0,0045 1255200 2. PHPUnit_TextUI_Command::main(???) /usr/bin/phpunit:46 0,0045 1256256 3. PHPUnit_TextUI_Command->run(array (0 => '/usr/bin/phpunit'), TRUE) /usr/share/php/PHPUnit/TextUI/Command.php:130 0,1396 8990328 4. PHPUnit_TextUI_TestRunner->doRun(class PHPUnit_Framework_TestSuite { protected $backupGlobals = FALSE; protected $backupStaticAttributes = NULL; protected $name = 'OntoWiki'; protected $groups = array (...); protected $tests = array (...); protected $numTests = 67; protected $testCase = FALSE }, array ('listGroups' => FALSE, 'loader' => NULL, 'useDefaultConfiguration' => TRUE, 'configuration' => '/home/jonas/programming/php-workspace/ow/phpunit.xml.dist')) /usr/share/php/PHPUnit/TextUI/Command.php:192 0,1709 9895896 5. PHPUnit_Framework_TestSuite->run(class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }, FALSE, array (), array (), FALSE) /usr/share/php/PHPUnit/TextUI/TestRunner.php:325 1,1930 20510624 6. PHPUnit_Framework_TestSuite->run(class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }, FALSE, array (), array (), FALSE) /usr/share/php/PHPUnit/Framework/TestSuite.php:705 1,1932 20512600 7. PHPUnit_Framework_TestSuite->runTest(class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }, class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }) /usr/share/php/PHPUnit/Framework/TestSuite.php:745 1,1932 20512600 8. PHPUnit_Framework_TestCase->run(class PHPUnit_Framework_TestResult { protected $passed = array (...); protected $errors = array (...); protected $deprecatedFeatures = array (...); protected $failures = array (...); protected $notImplemented = array (...); protected $skipped = array (...); protected $listeners = array (...); protected $runTests = 44; ... }) /usr/share/php/PHPUnit/Framework/TestSuite.php:772 1,1933 20512600 9. PHPUnit_Framework_TestResult->run(class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }) /usr/share/php/PHPUnit/Framework/TestCase.php:751 1,1948 20515984 10. PHP_Invoker->invoke(array (0 => class IndexControllerTest { ... }, 1 => 'runBare'), array (), 1) /usr/share/php/PHPUnit/Framework/TestResult.php:647 1,1950 20515544 11. call_user_func_array(array (0 => class IndexControllerTest { ... }, 1 => 'runBare'), array ()) /usr/share/php/PHP/Invoker.php:93 1,1950 20515912 12. PHPUnit_Framework_TestCase->runBare() /usr/share/php/PHP/Invoker.php:0 1,6008 26410928 13. PHPUnit_Framework_TestCase->runTest() /usr/share/php/PHPUnit/Framework/TestCase.php:804 1,6009 26413032 14. ReflectionMethod->invokeArgs(class IndexControllerTest { public $bootstrap = class Zend_Application { ... }; protected $_frontController = class Zend_Controller_Front { ... }; protected $_query = NULL; protected $_request = class Zend_Controller_Request_HttpTestCase { ... }; protected $_response = class Zend_Controller_Response_HttpTestCase { ... }; protected $_xpathNamespaces = array (...); protected $backupGlobals = FALSE; protected $backupGlobalsBlacklist = array (...); ... }, array ()) /usr/share/php/PHPUnit/Framework/TestCase.php:942 1,6009 26413088 15. IndexControllerTest->testNoControllerAndActionDefaultToNewsAction() /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:0 1,6010 26413224 16. Zend_Test_PHPUnit_ControllerTestCase->dispatch('/') /home/jonas/programming/php-workspace/ow/application/tests/controllers/IndexControllerTest.php:65 1,6102 26623944 17. Zend_Application->run() /home/jonas/programming/php-workspace/ow/libraries/Zend/Test/PHPUnit/ControllerTestCase.php:206 1,6103 26623944 18. Zend_Application_Bootstrap_Bootstrap->run() /home/jonas/programming/php-workspace/ow/libraries/Zend/Application.php:366 1,6113 26624080 19. Zend_Controller_Front->dispatch(???, ???) /home/jonas/programming/php-workspace/ow/libraries/Zend/Application/Bootstrap/Bootstrap.php:97 2,1273 30559856 20. Zend_Controller_Plugin_Broker->postDispatch(class Zend_Controller_Request_HttpTestCase { protected $_headers = array (...); protected $_method = 'GET'; protected $_rawBody = NULL; protected $_validMethodTypes = array (...); protected $_paramSources = array (...); protected $_requestUri = '/'; protected $_baseUrl = ''; protected $_basePath = NULL; ... }) /home/jonas/programming/php-workspace/ow/libraries/Zend/Controller/Front.php:965 2,1276 30559856 21. Zend_Layout_Controller_Plugin_Layout->postDispatch(class Zend_Controller_Request_HttpTestCase { protected $_headers = array (...); protected $_method = 'GET'; protected $_rawBody = NULL; protected $_validMethodTypes = array (...); protected $_paramSources = array (...); protected $_requestUri = '/'; protected $_baseUrl = ''; protected $_basePath = NULL; ... }) /home/jonas/programming/php-workspace/ow/libraries/Zend/Controller/Plugin/Broker.php:333 2,1288 30560584 22. Zend_Layout->render(???) /home/jonas/programming/php-workspace/ow/libraries/Zend/Layout/Controller/Plugin/Layout.php:143 2,1350 30568280 23. Zend_View_Abstract->render('layout.phtml') /home/jonas/programming/php-workspace/ow/libraries/Zend/Layout.php:796 2,1353 30610064 24. Zend_View->_run('/home/jonas/programming/php-workspace/ow/application/views/templates/layouts/layout.phtml') /home/jonas/programming/php-workspace/ow/libraries/Zend/View/Abstract.php:888 2,1372 30759400 25. include('/home/jonas/programming/php-workspace/ow/application/views/templates/layouts/layout.phtml') /home/jonas/programming/php-workspace/ow/libraries/Zend/View.php:108

jbrekle avatar Jul 10 '12 11:07 jbrekle

can't reproduce this error, it was most likely fixed in the meantime (though I just noticed, that we execute more unit tests then usual (and all of them fail/skip) if we execute ./vendor/bin/phpunit instead of make test/make test-unit)

shinobu avatar Jun 07 '16 10:06 shinobu