Merge branch 'PHP-7.4'

* PHP-7.4:
  Make test more robust
This commit is contained in:
Christoph M. Becker 2019-11-04 12:23:00 +01:00
commit 31f1254182

View file

@ -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))
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--