Fix astat imperciseness excemption in test

This commit is contained in:
Ilija Tovilo 2023-11-12 14:06:02 +01:00 committed by Ben Ramsey
parent f7f9401cc8
commit fe34dd1b49
No known key found for this signature in database
GPG key ID: F9C39DC0B9698544

View file

@ -608,7 +608,7 @@ function compare_stats($stat1, $stat2, $fields, $op = "==", $flag = false ) {
{ {
case "==": case "==":
if ( $stat1[ $fields[$index] ] != $stat2[ $fields[$index] ] ) { if ( $stat1[ $fields[$index] ] != $stat2[ $fields[$index] ] ) {
if ( ! in_array( $index, $stat_time_diff_keys ) ) { if ( ! in_array( $fields[$index], $stat_time_diff_keys ) ) {
$result = false; $result = false;
echo "Error: stat1 do not match with stat2 at key value: $fields[$index]\n"; echo "Error: stat1 do not match with stat2 at key value: $fields[$index]\n";
} elseif (abs($stat1[ $fields[$index] ] - $stat2[ $fields[$index] ]) > 1) { } elseif (abs($stat1[ $fields[$index] ] - $stat2[ $fields[$index] ]) > 1) {