Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/standard/tests/hrtime/hrtime.phpt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--TEST--
Test hrtime() aligns with microtime()
--XFAIL--
--FLAKY--
This test frequently fails in CI
--FILE--
<?php
Expand Down
8 changes: 5 additions & 3 deletions run-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -2747,7 +2747,7 @@ function run_test(string $php, $file, array $env): string

$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;
}
Expand Down Expand Up @@ -2875,9 +2875,10 @@ function run_test(string $php, $file, array $env): string
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))i', $output) === 1;
return preg_match('((timed out)|(connection refused))i', $output) === 1
|| $test->hasSection('FLAKY');
}

/**
Expand Down Expand Up @@ -3861,6 +3862,7 @@ class TestFile
'INI', 'ENV', 'EXTENSIONS',
'SKIPIF', 'XFAIL', 'XLEAK', 'CLEAN',
'CREDITS', 'DESCRIPTION', 'CONFLICTS', 'WHITESPACE_SENSITIVE',
'FLAKY',
];

/**
Expand Down