diff -u b/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php --- b/core/modules/migrate/src/MigrateExecutable.php +++ b/core/modules/migrate/src/MigrateExecutable.php @@ -283,15 +283,15 @@ // If anyone has requested we stop, return the requested result. if ($this->migration->getStatus() == MigrationInterface::STATUS_STOPPING) { - $return = $this->migration->getMigrationResult(); + $return = $this->migration->getInterruptionResult(); + $this->migration->clearInterruptionResult(); break; } // If anyone has requested we stop, return the requested result. if ($this->migration->getStatus() == MigrationInterface::STATUS_STOPPING) { - $return = $this->migration->getInterruptionResult(); - $this->migration->clearInterruptionResult(); + $return = $this->migration->getMigrationResult(); break; } @@ -300,13 +300,13 @@ } } - $this->migration->setMigrationResult($return); $this->getEventDispatcher()->dispatch(MigrateEvents::POST_IMPORT, new MigrateImportEvent($this->migration)); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return $return; } } + $this->migration->setMigrationResult($return); $this->getEventDispatcher()->dispatch(MigrateEvents::POST_IMPORT, new MigrateImportEvent($this->migration)); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); return $return; @@ -346,7 +346,8 @@ // If anyone has requested we stop, return the requested result. if ($this->migration->getStatus() == MigrationInterface::STATUS_STOPPING) { - $return = $this->migration->getMigrationResult(); + $return = $this->migration->getInterruptionResult(); + $this->migration->clearInterruptionResult(); break; } } @@ -356,7 +357,6 @@ } // Notify modules that rollback attempt was complete. - $this->migration->setMigrationResult($return); $this->getEventDispatcher()->dispatch(MigrateEvents::POST_ROLLBACK, new MigrateRollbackEvent($this->migration)); $this->migration->setStatus(MigrationInterface::STATUS_IDLE); reverted: --- b/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTestBase.php +++ a/core/modules/node/src/Tests/Migrate/d6/MigrateNodeTestBase.php @@ -73,6 +73,9 @@ ); $this->prepareMigrations($id_mappings); + $migration = entity_load('migration', 'd6_node_settings'); + $migration->setMigrationResult(MigrationInterface::RESULT_COMPLETED); + // Create a test node. $node = entity_create('node', array( 'type' => 'story',