Make WordPress Core

Changeset 49913


Ignore:
Timestamp:
12/30/2020 07:02:03 PM (4 years 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].

See #51669.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-plugins-controller.php

    r49603 r49913  
    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.