Skip to content

Commit 702e349

Browse files
committed
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: rework that test to allow delta for rounding errors
2 parents d777669 + a037b6d commit 702e349

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎ext/pdo_pgsql/tests/bug69752.phpt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ for($i = 0; $i < $max; $i++) {
4242

4343
if ($first_time_usage === null) $first_time_usage = $usage;
4444

45-
if ($first_time_usage != $usage){
45+
/* Use delta instead of direct comparison here */
46+
if (abs($first_time_usage - $usage) > 3){
4647
printf("Memory Leak Detected: %d != %d\n", $usage, $first_time_usage);
4748
break;
4849
}

0 commit comments

Comments
 (0)