Issue #3442259 by catch, quietone, dww: Reduce time of Migrate Upgrade tests by not outputting the logs by default

(cherry picked from commit 62b65430ed)
merge-requests/7377/merge
Alex Pott 2024-04-25 11:32:44 +01:00
parent 12b2857f25
commit f91aed85e8
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
3 changed files with 10 additions and 7 deletions

View File

@ -53,7 +53,6 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
protected function tearDown(): void { protected function tearDown(): void {
if ($this->outputLogs) { if ($this->outputLogs) {
$this->outputLogs($this->migratedAdminUserName); $this->outputLogs($this->migratedAdminUserName);
$this->assertLogError();
} }
parent::tearDown(); parent::tearDown();
} }

View File

@ -54,10 +54,11 @@ class Upgrade6Test extends MigrateUpgradeExecuteTestBase {
$this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal6.php'); $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal6.php');
// Enable saving the logs and set the post migration admin user name.
$this->outputLogs = TRUE;
$this->migratedAdminUserName = 'root';
$this->expectedLoggedErrors = 39; $this->expectedLoggedErrors = 39;
// If saving the logs, then set the admin user.
if ($this->outputLogs) {
$this->migratedAdminUserName = 'admin';
}
} }
/** /**
@ -207,6 +208,7 @@ class Upgrade6Test extends MigrateUpgradeExecuteTestBase {
$this->assertFollowUpMigrationResults(); $this->assertFollowUpMigrationResults();
$this->assertEntityRevisionsCount('node', 26); $this->assertEntityRevisionsCount('node', 26);
$this->assertEmailsSent(); $this->assertEmailsSent();
$this->assertLogError();
} }
/** /**

View File

@ -57,10 +57,11 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
$this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php'); $this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');
// Enable saving the logs and set the post migration admin user name.
$this->outputLogs = TRUE;
$this->migratedAdminUserName = 'admin';
$this->expectedLoggedErrors = 27; $this->expectedLoggedErrors = 27;
// If saving the logs, then set the admin user.
if ($this->outputLogs) {
$this->migratedAdminUserName = 'admin';
}
} }
/** /**
@ -234,6 +235,7 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
$this->assertFollowUpMigrationResults(); $this->assertFollowUpMigrationResults();
$this->assertEntityRevisionsCount('node', 19); $this->assertEntityRevisionsCount('node', 19);
$this->assertEmailsSent(); $this->assertEmailsSent();
$this->assertLogError();
} }
/** /**