From a037b6de213c0326bcff486d9608a56965059725 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Thu, 11 Jun 2015 17:05:03 +0200 Subject: [PATCH] rework that test to allow delta for rounding errors If this workout doesn't make travis happy, the patch needs to be reviewed as the leak might still persist. --- ext/pdo_pgsql/tests/bug69752.phpt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/pdo_pgsql/tests/bug69752.phpt b/ext/pdo_pgsql/tests/bug69752.phpt index 6cf9a0a928..bb7e5e87e7 100644 --- a/ext/pdo_pgsql/tests/bug69752.phpt +++ b/ext/pdo_pgsql/tests/bug69752.phpt @@ -42,7 +42,8 @@ for($i = 0; $i < $max; $i++) { if ($first_time_usage === null) $first_time_usage = $usage; - if ($first_time_usage != $usage){ + /* Use delta instead of direct comparison here */ + if (abs($first_time_usage - $usage) > 3){ printf("Memory Leak Detected: %d != %d\n", $usage, $first_time_usage); break; } -- 2.40.0