While #30564 only applies to 3.0, I think it's worth improving the tests in 2.6.x – where BatchDataSourceScriptDatabaseInitializer was introduced – and later.