WordPress.org

Make WordPress Core

Changeset 50084


Ignore:
Timestamp:
01/30/2021 10:37:53 AM (8 months ago)
Author:
SergeyBiryukov
Message:

Tests: Disable update checks while running REST API plugin installation tests.

This prevents external HTTP requests that are not required for the tests in question and may interfere with the results in case of a timeout.

Follow-up to [48242], [49491].

Merges [49913] to the 5.5 branch.
See #51669.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/tests/phpunit/tests/rest-api/rest-plugins-controller.php

    r48627 r50084  
    10241024            3
    10251025        );
     1026
     1027        // Remove upgrade hooks which are not required for plugin installation tests
     1028        // and may interfere with the results due to a timeout in external HTTP requests.
     1029        remove_action( 'upgrader_process_complete', array( 'Language_Pack_Upgrader', 'async_upgrade' ), 20 );
     1030        remove_action( 'upgrader_process_complete', 'wp_version_check' );
     1031        remove_action( 'upgrader_process_complete', 'wp_update_plugins' );
     1032        remove_action( 'upgrader_process_complete', 'wp_update_themes' );
    10261033    }
    10271034
Note: See TracChangeset for help on using the changeset viewer.