Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev/core#2073 Improve cleanup on syntax conformance test #18640

Merged
merged 1 commit into from Oct 1, 2020

Conversation

eileenmcnaughton
Copy link
Contributor

@eileenmcnaughton eileenmcnaughton commented Sep 30, 2020

Overview

Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action

#18639

Before

deletable objects accumulate

After

They are unset

on just the testSqlOperators

Screen Shot 2020-10-01 at 1 54 36 PM

Technical Details

Comments

@civibot
Copy link

civibot bot commented Sep 30, 2020

(Standard links)

@civibot civibot bot added the master label Sep 30, 2020
@seamuslee001
Copy link
Contributor

Jenkins re test this please

@seamuslee001
Copy link
Contributor

This has failed twice now on

PHP Fatal error:  Allowed memory size of 2147483648 bytes exhausted (tried to allocate 652218368 bytes) in /home/jenkins/bknix-dfl/build/core-18640-91j1v/web/sites/all/modules/civicrm/tests/phpunit/api/v3/SyntaxConformanceTest.php on line 1516
PHP Stack trace:
PHP   1. {main}() /home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar:0
PHP   2. PHPUnit\TextUI\Command::main() /home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar:615
PHP   3. PHPUnit\TextUI\Command->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/Command.php:162
PHP   4. PHPUnit\TextUI\TestRunner->doRun() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/Command.php:206
PHP   5. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/TextUI/TestRunner.php:652
PHP   6. PHPUnit\Framework\TestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestSuite.php:746
PHP   7. PHPUnit\Framework\DataProviderTestSuite->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestSuite.php:746
PHP   8. api_v3_SyntaxConformanceTest->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestSuite.php:746
PHP   9. PHPUnit\Framework\TestResult->run() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestCase.php:796
PHP  10. api_v3_SyntaxConformanceTest->runBare() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestResult.php:693
PHP  11. api_v3_SyntaxConformanceTest->runTest() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestCase.php:842
PHP  12. api_v3_SyntaxConformanceTest->runTest() /home/jenkins/bknix-dfl/build/core-18640-91j1v/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:226
PHP  13. api_v3_SyntaxConformanceTest->testCreateSingleValueAlter() phar:///home/jenkins/bknix-dfl/extern/phpunit7/phpunit7.phar/phpunit/Framework/TestCase.php:1154
PHP  14. print_r() /home/jenkins/bknix-dfl/build/core-18640-91j1v/web/sites/all/modules/civicrm/tests/phpunit/api/v3/SyntaxConformanceTest.php:1516

Cleaning up all objects seems a bit too much - but ensuring we
re-set the DAO we create in this class should be a memory-friendly action

civicrm#18639
@eileenmcnaughton
Copy link
Contributor Author

I think it must have been the call to parent::tearDown - trying without

@seamuslee001
Copy link
Contributor

This looks fine to me test only and Jenkins has approved it

@seamuslee001 seamuslee001 merged commit 29ff32e into civicrm:master Oct 1, 2020
@seamuslee001 seamuslee001 deleted the syn branch October 1, 2020 02:57
@eileenmcnaughton
Copy link
Contributor Author

It will be interesting to see if the faster test run (1h26m) was a fluke or meaningfull

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants