mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1: Implement flaky test section
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
--TEST--
|
||||
Test hrtime() aligns with microtime()
|
||||
--XFAIL--
|
||||
--FLAKY--
|
||||
This test frequently fails in CI
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
@@ -2626,7 +2626,7 @@ COMMAND $cmd
|
||||
|
||||
$wanted_re = null;
|
||||
}
|
||||
if (!$passed && !$retried && $retriable && error_may_be_retried($output)) {
|
||||
if (!$passed && !$retried && $retriable && error_may_be_retried($test, $output)) {
|
||||
$retried = true;
|
||||
goto retry;
|
||||
}
|
||||
@@ -2806,9 +2806,10 @@ SH;
|
||||
return $restype[0] . 'ED';
|
||||
}
|
||||
|
||||
function error_may_be_retried(string $output): bool
|
||||
function error_may_be_retried(TestFile $test, string $output): bool
|
||||
{
|
||||
return preg_match('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i', $output) === 1;
|
||||
return preg_match('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i', $output) === 1
|
||||
|| $test->hasSection('FLAKY');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3798,6 +3799,7 @@ class TestFile
|
||||
'INI', 'ENV', 'EXTENSIONS',
|
||||
'SKIPIF', 'XFAIL', 'XLEAK', 'CLEAN',
|
||||
'CREDITS', 'DESCRIPTION', 'CONFLICTS', 'WHITESPACE_SENSITIVE',
|
||||
'FLAKY',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user