diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-04 12:23:00 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-11-04 12:23:00 +0100 |
commit | 31f12541827b88fce62c887ea9de3ae6665a421c (patch) | |
tree | 8dc228a92f47c41543bcefc4630b4f69c57db71b | |
parent | b509d67554f729b8b81ce906a46262357f79a87b (diff) | |
parent | 00c9c480eb1f19b50f07fe6d51a018a31870d109 (diff) | |
download | php-git-31f12541827b88fce62c887ea9de3ae6665a421c.tar.gz |
Merge branch 'PHP-7.4'
* PHP-7.4:
Make test more robust
-rw-r--r-- | ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt index 206b236311..4a142eee38 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_attr_server_info.phpt @@ -40,8 +40,11 @@ $db = MySQLPDOTest::factory(); if (!preg_match('/Uptime/i', $info)) printf("[006] Can't find uptime in server info '%s'\n", $info); - if (isset($uptime) && !preg_match(sprintf('/Uptime: %d/i', $uptime), $info)) - printf("[007] SHOW STATUS and server info have reported a different uptime, please check. Server info: '%s', SHOW STATUS: '%s'\n", $info, $uptime); + if (isset($uptime)) { + if (!preg_match('/Uptime: (\d+)/i', $info, $matches) || $uptime - $matches[1] > 1) { + printf("[007] SHOW STATUS and server info have reported a different uptime, please check. Server info: '%s', SHOW STATUS: '%s'\n", $info, $uptime); + } + } print "done!"; --EXPECT-- |