[ticket/17176] Take care of MSSQL being slow

PHPBB3-17176
This commit is contained in:
Marc Alexander 2023-08-22 21:48:25 +02:00
parent 4abac49d35
commit dc4d79f3a8
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -98,6 +98,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
$this->migrator->set_migrations(array('phpbb_dbal_migration_dummy'));
// schema
$start_time = time();
$this->migrator->update();
$this->assertFalse($this->migrator->finished());
@ -106,12 +107,13 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
"SELECT 1 as success
FROM phpbb_migrations
WHERE migration_name = 'phpbb_dbal_migration_dummy'
AND migration_start_time >= " . (time() - 1) . "
AND migration_start_time >= " . ($start_time - 1) . "
AND migration_start_time <= " . (time() + 1),
'Start time set correctly'
);
// data
$start_time = time();
$this->migrator->update();
$this->assertTrue($this->migrator->finished());
@ -127,7 +129,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case
FROM phpbb_migrations
WHERE migration_name = 'phpbb_dbal_migration_dummy'
AND migration_start_time <= migration_end_time
AND migration_end_time >= " . (time() - 1) . "
AND migration_end_time >= " . ($start_time - 1) . "
AND migration_end_time <= " . (time() + 1),
'End time set correctly'
);