diff options
| author | Anatol Belski <ab@php.net> | 2015-06-11 17:05:03 +0200 |
|---|---|---|
| committer | Anatol Belski <ab@php.net> | 2015-06-11 17:05:03 +0200 |
| commit | a037b6de213c0326bcff486d9608a56965059725 (patch) | |
| tree | 43440c0a4dcbf40e09230882198849bda828d62e /ext | |
| parent | dcfd1153ec9a45e055081c8f1f44c6eef919588c (diff) | |
| download | php-git-a037b6de213c0326bcff486d9608a56965059725.tar.gz | |
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.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/pdo_pgsql/tests/bug69752.phpt | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |
