Make WordPress Core


Ignore:
Timestamp:
02/21/2024 08:04:50 PM (8 months ago)
Author:
hellofromTonya
Message:

Build/Test Tools: Revert r57684.

Changes to the test_readme_mariadb_version() test were made in an effort to stabilize the connection tests and CI failures. After the changeset, all multisite tests CI jobs connected and passed, but oddly all single site tests CI jobs repeatedly and consistently failed.

Reverting to unblock the CI jobs while continued investigation happens.

See #59647.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/readme.php

    r57684 r57689  
    7070        $readme = file_get_contents( ABSPATH . 'readme.html' );
    7171
    72         preg_match( '#Recommendations.*MariaDB</a> version <strong>([0-9.]*)#s', $readme, $recommended );
    73         $this->assertCount( 2, $recommended, 'The recommended version was not matched.' );
     72        preg_match( '#Recommendations.*MariaDB</a> version <strong>([0-9.]*)#s', $readme, $matches );
     73        $matches[1] = str_replace( '.', '', $matches[1] );
    7474
    75         $all_releases       = $this->get_response_body( 'https://mariadb.org/mariadb/all-releases/' );
    76         $recommended_regex  = str_replace( '.', '\.', $recommended[1] ) . '\.\d{1,2}'; // Examples: 10.4.1 or 10.4.22
    77         $release_date_regex = '(\d{4}-\d{2}-\d{2})'; // Example: 2024-01-01
     75        $response_body = $this->get_response_body( "https://mariadb.com/kb/en/release-notes-mariadb-{$matches[1]}-series/" );
    7876
    7977        // Retrieve the date of the first stable release for the recommended branch.
    80         preg_match( "#{$recommended_regex}.*?{$release_date_regex}#", $all_releases, $release_date );
    81         $this->assertCount( 2, $release_date, 'The release date was not matched.' );
     78        preg_match( '#.*Stable.*?(\d{2} [A-Za-z]{3} \d{4})#s', $response_body, $mariadb_matches );
    8279
    8380        // Per https://mariadb.org/about/#maintenance-policy, MariaDB releases are supported for 5 years.
    84         $mariadb_eol  = gmdate( 'Y-m-d', strtotime( $release_date[1] . ' +5 years' ) );
     81        $mariadb_eol  = gmdate( 'Y-m-d', strtotime( $mariadb_matches[1] . ' +5 years' ) );
    8582        $current_date = gmdate( 'Y-m-d' );
    8683
Note: See TracChangeset for help on using the changeset viewer.