- Issue created by @sime
- πΊπΈUnited States phenaproxima Massachusetts
Anecdotally, I find the functional JS tests are flakier than any other kind, but in Project Browser I am occasionally seeing an InstallerControllerTest case fail randomly too.
But I don't see any random failures with unit or kernel tests.
- π¦πΊAustralia sime Melbourne
I analysed the events that PM provides using xhprof, and the StatusCheck event is by far the only event where significant amount of time is spent in our tests, which specifally is any tests where:
- Package Manager is installed
- drupalGet('admin/modules/browse')
.
This is the same as π Too slow to validatePackageManager() on every page Needs review but obviously the solutions will differ. I've created an MR to try @phenaproxima's suggestion in Slack which is to put an event first and then stop propagation.
For the record these are the events subscriber that are running when the test his /admin/modules/browse where the vast majority of time is spent:
- Drupal\package_manager\Validator\ComposerValidator::validate
- Drupal\package_manager\Validator\DiskSpaceValidator::validate
- Drupal\package_manager\Validator\WritableFileSystemValidator::validate
- Drupal\package_manager\Validator\MultisiteValidator::validate
- Drupal\package_manager\Validator\SymlinkValidator::validate
- Drupal\package_manager\Validator\StageNotInActiveValidator::validate
- Drupal\package_manager\Validator\BaseRequirementsFulfilledValidator::validate
- Drupal\package_manager\Validator\PendingUpdatesValidator::validate
- Drupal\package_manager\Validator\LockFileValidator::validate
- Drupal\package_manager\Validator\AllowedScaffoldPackagesValidator::validate
- Drupal\package_manager\Validator\StagedDBUpdateValidator::checkForStagedDatabaseUpdates
- Drupal\package_manager\PathExcluder\UnknownPathExcluder::logExcludedPaths
- Drupal\package_manager\Validator\SettingsValidator::validate
- Drupal\package_manager\Validator\RsyncValidator::validate
- Drupal\package_manager\Validator\ComposerPluginsValidator::validate
- Drupal\package_manager\Validator\ComposerPatchesValidator::validate
- Drupal\package_manager\Validator\PhpExtensionsValidator::validateXdebug
- Drupal\package_manager\Validator\PhpExtensionsValidator::validateOpenSsl
- π¦πΊAustralia sime Melbourne
Re #2, InstallerControllerTest often calls routes like `admin/modules/project_browser/install-begin/drupalorg_mockapi/awesome_module` and this triggers status checks which can time out. I believe.