When running the full suite of CiviCRM unit tests locally, I'm seeing a bunch of failures and, eventually, a timeout at 64% of tests run. I've tried setting the php.ini setting max_execution_time=0, but it looks like this is being overridden somewhere internally as the final error shows PHP Fatal error: Maximum execution time of 180 seconds exceeded in /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Utils/ReflectionUtils.php on line 77
I was running the tests for this patch locally https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/886207 to try and confirm no regressions were introduced. The tests do pass on CI, so it feels like potentially an environment inconsistency. Also, the tests took around 21 minutes to run before failing. Can revisit the test suites to remove or optimise any slow or duplicated tests to speed this up. I saw a bunch of tests using dataProviders which we might be able to slim down with less permutation testing.
The full console output is here:
1 | docker@civicrm:/srv/civi-sites/wmff/drupal$ drush updb -v |
---|---|
2 | Include /srv/civicrm-buildkit/extern/drush-lib [notice] |
3 | Executing: mysql --defaults-extra-file=/tmp/drush_zUzXoP --database=drupal --host=database --port=3306 --silent < /tmp/drush_nrIXP0 |
4 | Executing: mysql --defaults-extra-file=/tmp/drush_ajhlCs --database=drupal --host=database --port=3306 --silent < /tmp/drush_CGMC0D |
5 | The following module is missing from the file system: <em class="placeholder">orphan_slayer</em>. For information about how to fix this, see <a href="https://www.drupal.org/node/2487215">the [warning] |
6 | documentation page</a>. bootstrap.inc:1181 |
7 | No database updates required [success] |
8 | Command dispatch complete [notice] |
9 | docker@civicrm:/srv/civi-sites/wmff/drupal$ drush cvupdb -v |
10 | Include /srv/civicrm-buildkit/extern/drush-lib [notice] |
11 | Executing: mysql --defaults-extra-file=/tmp/drush_FQ1GFf --database=drupal --host=database --port=3306 --silent < /tmp/drush_AjNmB5 |
12 | Executing: mysql --defaults-extra-file=/tmp/drush_o3l5Rz --database=drupal --host=database --port=3306 --silent < /tmp/drush_fk1RLp |
13 | You are already upgraded to CiviCRM 5.58.1 |
14 | Command dispatch complete [notice] |
15 | docker@civicrm:/srv/civi-sites/wmff/drupal$ cd ../ |
16 | docker@civicrm:/srv/civi-sites/wmff$ ./vendor/bin/phpunit |
17 | PHPUnit 8.0.0 by Sebastian Bergmann and contributors. |
18 | |
19 | ............................................................... 63 / 583 ( 10%) |
20 | ..........................................F.................... 126 / 583 ( 21%) |
21 | ..............E...civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
22 | .civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
23 | .......civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
24 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
25 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
26 | ....civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
27 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
28 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
29 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
30 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
31 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
32 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
33 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
34 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
35 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
36 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
37 | .civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
38 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
39 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
40 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
41 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
42 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
43 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
44 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
45 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
46 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
47 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
48 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
49 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
50 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
51 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
52 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
53 | civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
54 | .....civicrm.wmf.WARNING: wmf_civicrm: No cash submethod given |
55 | ........................... 189 / 583 ( 32%) |
56 | ......................................civicrm.wmf.ERROR: adyen_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-adyen-20170219.gz seems not to exist |
57 | |
58 | .civicrm.wmf.ERROR: adyen_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-adyen-20200224.gz seems not to exist |
59 | |
60 | ....civicrm.wmf.ERROR: amazon_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-amazon_gateway-20151002.gz seems not to exist |
61 | |
62 | ...civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150616.gz seems not to exist |
63 | |
64 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150615.gz seems not to exist |
65 | |
66 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150614.gz seems not to exist |
67 | |
68 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150613.gz seems not to exist |
69 | |
70 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150612.gz seems not to exist |
71 | |
72 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150611.gz seems not to exist |
73 | |
74 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150610.gz seems not to exist |
75 | |
76 | civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150609.gz seems not to exist |
77 | |
78 | .civicrm.wmf.ERROR: astropay_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-astropay-20150618.gz seems not to exist |
79 | |
80 | ..civicrm.wmf.ERROR: braintree_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-braintree-20220629.gz seems not to exist |
81 | |
82 | ....civicrm.wmf.ERROR: ingenico_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-ingenico-20170730.gz seems not to exist |
83 | |
84 | .civicrm.wmf.ERROR: ingenico_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-ingenico-20180501.gz seems not to exist |
85 | |
86 | ....civicrm.wmf.ERROR: ingenico_audit: Archive file /srv/civi-sites/wmff/drupal/sites/all/modules/wmf_audit/tests/data/logs//payments-ingenico-20171207.gz seems not to exist |
87 | |
88 | ....F 252 / 583 ( 43%) |
89 | ..........FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 315 / 583 ( 54%) |
90 | FFFFFFFFFFFFFFFFFFFFFFFFFF..................................... 378 / 583 ( 64%) |
91 | ............................PHP Fatal error: Maximum execution time of 180 seconds exceeded in /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Utils/ReflectionUtils.php on line 77 |
92 | PHP Stack trace: |
93 | PHP 1. {main}() /srv/civi-sites/wmff/vendor/bin/phpunit:0 |
94 | PHP 2. include() /srv/civi-sites/wmff/vendor/bin/phpunit:118 |
95 | PHP 3. PHPUnit\TextUI\Command::main() phpvfscomposer:///srv/civi-sites/wmff/vendor/phpunit/phpunit/phpunit:60 |
96 | PHP 4. PHPUnit\TextUI\Command->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/TextUI/Command.php:164 |
97 | PHP 5. PHPUnit\TextUI\TestRunner->doRun() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/TextUI/Command.php:208 |
98 | PHP 6. PHPUnit\Framework\TestSuite->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:632 |
99 | PHP 7. PHPUnit\Framework\TestSuite->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761 |
100 | PHP 8. PHPUnit\Framework\TestSuite->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761 |
101 | PHP 9. GeocoderTest->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestSuite.php:761 |
102 | PHP 10. PHPUnit\Framework\TestResult->run() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestCase.php:797 |
103 | PHP 11. GeocoderTest->runBare() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestResult.php:685 |
104 | PHP 12. GeocoderTest->setUp() /srv/civi-sites/wmff/vendor/phpunit/phpunit/src/Framework/TestCase.php:839 |
105 | PHP 13. GeocoderTest->callAPISuccess() /srv/civi-sites/wmff/drupal/sites/default/civicrm/extensions/org.wikimedia.geocoder/tests/phpunit/GeocoderTest.php:86 |
106 | PHP 14. GeocoderTest->civicrm_api() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Test/Api3TestTrait.php:173 |
107 | PHP 15. civicrm_api() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Test/Api3TestTrait.php:292 |
108 | PHP 16. Civi\API\Kernel->runSafe() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/api/api.php:22 |
109 | PHP 17. Civi\API\Kernel->runRequest() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php:81 |
110 | PHP 18. Civi\API\Provider\MagicFunctionProvider->invoke() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php:158 |
111 | PHP 19. civicrm_api3_system_flush() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/API/Provider/MagicFunctionProvider.php:89 |
112 | PHP 20. CRM_Core_Invoke::rebuildMenuAndCaches() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/api/v3/System.php:33 |
113 | PHP 21. CRM_Core_ManagedEntities->reconcile() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/Invoke.php:417 |
114 | PHP 22. CRM_Core_ManagedEntities->reconcileEntities() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php:113 |
115 | PHP 23. CRM_Core_ManagedEntities->updateExistingEntity() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php:145 |
116 | PHP 24. civicrm_api4() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/ManagedEntities.php:258 |
117 | PHP 25. Civi\Api4\Generic\DAOUpdateAction->execute() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/api/api.php:85 |
118 | PHP 26. Civi\API\Kernel->runRequest() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractAction.php:250 |
119 | PHP 27. Civi\Api4\Provider\ActionObjectProvider->invoke() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/API/Kernel.php:158 |
120 | PHP 28. Civi\Api4\Generic\DAOUpdateAction->_run() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Provider/ActionObjectProvider.php:72 |
121 | PHP 29. Civi\Api4\Generic\DAOUpdateAction->updateRecords() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractUpdateAction.php:93 |
122 | PHP 30. Civi\Api4\Generic\DAOUpdateAction->writeObjects() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/DAOUpdateAction.php:30 |
123 | PHP 31. Civi\Api4\Generic\DAOUpdateAction->write() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/Traits/DAOActionTrait.php:134 |
124 | PHP 32. CRM_Core_BAO_OptionValue::create() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/Traits/DAOActionTrait.php:163 |
125 | PHP 33. CRM_Core_BAO_OptionValue::add() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/BAO/OptionValue.php:34 |
126 | PHP 34. CRM_Utils_Hook::post() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/BAO/OptionValue.php:197 |
127 | PHP 35. Civi\Core\CiviEventDispatcher->dispatch() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Utils/Hook.php:370 |
128 | PHP 36. Civi\Core\UnoptimizedEventDispatcher->dispatch() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php:260 |
129 | PHP 37. Civi\Core\UnoptimizedEventDispatcher->callListeners() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:73 |
130 | PHP 38. CRM_Core_BAO_Managed::on_hook_civicrm_post() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/vendor/symfony/event-dispatcher/EventDispatcher.php:251 |
131 | PHP 39. CRM_Core_BAO_Managed::isApi4ManagedType() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Managed.php:36 |
132 | PHP 40. Civi\Api4\Utils\CoreUtil::getInfoItem() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/CRM/Core/BAO/Managed.php:53 |
133 | PHP 41. Civi\Api4\Provider\ActionObjectProvider->getEntities() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Utils/CoreUtil.php:58 |
134 | PHP 42. Civi\Api4\Afform::getInfo() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Provider/ActionObjectProvider.php:158 |
135 | PHP 43. Civi\Api4\Generic\AbstractEntity::getInfo() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/ext/afform/core/Civi/Api4/Afform.php:279 |
136 | PHP 44. Civi\Api4\Utils\ReflectionUtils::getCodeDocs() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Generic/AbstractEntity.php:164 |
137 | PHP 45. Civi\Api4\Utils\ReflectionUtils::parseDocBlock() /srv/civi-sites/wmff/drupal/sites/all/modules/civicrm/Civi/Api4/Utils/ReflectionUtils.php:33 |