-
Notifications
You must be signed in to change notification settings - Fork 9.4k
12696 Delete all test modules after integration tests #18459
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
12696 Delete all test modules after integration tests #18459
Conversation
Several test modules are created on the fly during startup of every integration test run, but they have never been deleted. This commit changes this, modules are deleted when the process ends
Without this check, the module files were deleted when the first test runner finishs. The second test runner might still need the module files.
I added a check, so the modules are NOT deleted if the integration tests are run parallelly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @avstudnitz thank you for your contribution, can you please fix the issues from the static tests?
FILE: deployTestModules.php
Line: 45 | Line exceeds maximum limit of 120 characters; contains 121 characters
Line: 66 | Expected 1 newline at end of file; 0 found
Hi @mhauri, thank you for the review. |
Did this ever manage to get merged? I can't see internal ENGCOM-3132. |
Hi @danslo |
Thanks for the update! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a fatal error duirng integration tests run:
[Integration-10-ce] PHP Fatal error: Uncaught Magento\Framework\Exception\FileSystemException: The "/var/www/html/app/code/Magento/TestModuleWysiwygConfig/etc/adminhtml/di.xml" file doesn't exist. in /var/www/html/lib/internal/Magento/Framework/Filesystem/File/Read.php:76
[Integration-10-ce] Stack trace:
[Integration-10-ce] #0 /var/www/html/lib/internal/Magento/Framework/Filesystem/File/Read.php(62): Magento\Framework\Filesystem\File\Read->assertValid()
[Integration-10-ce] #1 /var/www/html/lib/internal/Magento/Framework/Filesystem/File/Read.php(52): Magento\Framework\Filesystem\File\Read->open()
[Integration-10-ce] #2 /var/www/html/lib/internal/Magento/Framework/Filesystem/File/ReadFactory.php(44): Magento\Framework\Filesystem\File\Read->__construct('/var/www/html/a...', Object(Magento\Framework\Filesystem\Driver\File))
[Integration-10-ce] #3 /var/www/html/lib/internal/Magento/Framework/Config/FileIterator.php(69): Magento\Framework\Filesystem\File\ReadFactory->create('/var/www/html/a...', 'file')
[Integration-10-ce] #4 /var/www/html/lib/internal/Magento/Framework/Config/Reader/Filesystem.php(147): Magento\Framework\Config\FileIterator->current()
[Integration-10-ce] #5 /var/www/html in /var/www/html/lib/internal/Magento/Framework/Filesystem/File/Read.php on line 76
[Integration-0-b2b] b2b Integration Integration 0-1 exit code: 0
@nmalevanec could you please help to resolve this problem
ec1a6b4
to
2ff2c4e
Compare
squash! Fix integration tests run.
5dcc36f
to
d039298
Compare
Hi @avstudnitz, thank you for your contribution! |
Description
Several test modules are created on the fly during startup of every
integration test run, but they are never deleted. This PR
changes this, modules are deleted when the process ends.
Things we thought about but didn't implement:
dev/tests/integration/tmp/*/app/code/
: we'd need to modify the autoloader and the component registrar which might have caused side effects. Plus, the approach we tried didn't work out.dev/tests/integration/_files
and register them from there: same as above.dev/tests/integration/framework/removeTestModules.php
: PhpUnit doesn't offer an option to run a script after all tests have been executed.Fixed Issues
Manual testing scenarios
TestModule*
, i.e.TestModuleSample
, exist inapp/code/Magento
(they are created automatically when the tests are started).Contribution checklist