Problem/Motivation

I'm trying to do stuff that involves having tests passing, such as #2030633: Expand FieldStorageConfig with methods

I can't do those things because migrate always fails tests, both on the testbot and locally.

Repro:

Using: MAMP 3.0.3, with PHP 5.4.25, MySQL 5.5.34.

  1. Make a fresh install Drupal 8. I'm looking at bd0e53f429f13988199aaa603783f225d86965c5, but this has been going on for a while. (Still failing as of efc0e2e41df7be095b954e8cc9648b0ad3f3e8b9.)
  2. Enable simpletest/Testing.
  3. Run the MigrateDrupal6Test test.
  4. Behold the red divs of doom.

Running MigrateDrupal6Test apparently triggers runs of a series of tests. The failing tests for : MigrateCommentTest, MigrateDateFormatTest, MigrateForumConfigsTest, and MigrateMenuLinkTest.

As of efc0e2e41df7be095b954e8cc9648b0ad3f3e8b9:

  • MigrateAggregatorItemTest fails with a fatal error:Call to a member function id() on a non-object PHP Fatal error MigrateAggregatorItemTest.php 63 Unknown
  • MigrateDrupal6Test fails with a fatal error: The test did not complete due to a fatal error. Completion check MigrateFullDrupalTestBase.php 52 Drupal\migrate_drupal\Tests\d6\MigrateDrupal6Test->testDrupal() with no stack trace.

Proposed resolution

  • Figure out what the problem is.
  • Fix it.

Remaining tasks

User interface changes

API changes

Comments

Mile23’s picture

Well as of 03f372f3f7dadac50e04ad81bd88ce4e11a682a1 we're down to only failing in MigrateAggregatorItemTest and MigrateFullDrupalTestBase.

Yay progress.

Berdir’s picture

Those tests work on testbot and they work for me, if you have fails, then we will need some more information on what exactly is failing.

That said, the errors in the last patch in #2030633: Expand FieldStorageConfig with methods points at a very specific problem that can easily be fixed without having to run those tests locally? It also hints at code that has no test coverage except in the context of migrations.

Berdir’s picture

Status: Active » Postponed (maintainer needs more info)

Please post what test failures you have exactly, and what OS/PHP version you have. I've run those tests before, they worked and they also pass on testbot.

Mile23’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work
Berdir’s picture

Thanks. I'm not sure I can parse that description correctly. You are saying that the fatal error is in MigrateAggregatorItemTest while running MigrateDrupal6Test? Does MigrateAggregatorItemTest also fail if you run just that, directly? A screenshot might make it clearer...

Are you running the tests in the UI? does it also happen if you run them with run-tests.sh?

A fatal is often preceded by other exceptions/errors, is it just the fatal error, or do you see other errors too?

Looking at the test, that tries to load something that
My guess is that the migration itself aborts early, and then data is not there and the assertions start to fatal.

Mile23’s picture

Thanks for taking the time. I'm not going to work at this too hard on this, because when it comes to migrate, I have no desire to investigate further for personal reasons you can ask me about sometime.

Thanks. I'm not sure I can parse that description correctly. You are saying that the fatal error is in MigrateAggregatorItemTest while running MigrateDrupal6Test?

Yes.

Does MigrateAggregatorItemTest also fail if you run just that, directly?

Yes, IIRC.

Are you running the tests in the UI? does it also happen if you run them with run-tests.sh?

UI.

A fatal is often preceded by other exceptions/errors, is it just the fatal error, or do you see other errors too?

There are fatals and test fails. I assume the fails are related to the fatals.

Looking at the test, that tries to load something that
My guess is that the migration itself aborts early, and then data is not there and the assertions start to fatal.

It would be nice to not have to guess, wouldn't it? :-)

ultimike’s picture

Title: Migrate Tests Fail Consistently » Migrate Tests Fail Consistently when run through UI
mikeryan’s picture

Status: Needs work » Closed (cannot reproduce)

Well, it's been a long time, and there've been a lot of changes to the migration system and its tests since then. I have no trouble running the tests through the UI now - if any test failures are found (UI or command-line), they should be opened as distinct issues.