Problem/Motivation

d7/MigrateFieldTest and d7/MigrateFieldInstanceTest both have two tests which normally indicates there is something different in the preparation for the test (different modules installed or changes to the source database) but in this case there are none. That is the two tests are identical except for the assertions run after the migration is finished. There is no need for two separate tests. The migration can be run once and then all the assertions

Also, an annoyance factor when working with those tests.

Steps to reproduce

Proposed resolution

Move the assertions from the second test to the first tests and remove the second test.

Remaining tasks

patch, review, commit

CommentFileSizeAuthor
#2 3165763-2.patch2.17 KBquietone
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
FileSize
2.17 KB

Well, lets see if anything fails.

bisonbleu’s picture

Issue summary: View changes

Remove the lonely 'a' in «both have two tests which normally indicates a there is something different in...»

bisonbleu’s picture

Patch applies cleanly:

  • on simplytest.me
  • and locally after a git clone --branch 9.1.x https://git.drupalcode.org/project/drupal.git

Code is simple and makes sense.
What else is required before setting to RTBC?

mikelutz’s picture

Status: Needs review » Reviewed & tested by the community

Agreed, this makes sense, and saves a little bit of overhead.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3165763-2.patch, failed testing. View results

mikelutz’s picture

Status: Needs work » Reviewed & tested by the community

Looks to be an unrelated test failure.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: 3165763-2.patch, failed testing. View results

mikelutz’s picture

Status: Needs work » Reviewed & tested by the community

ditto

  • catch committed 98575f9 on 9.1.x
    Issue #3165763 by quietone, mikelutz: Combine two tests to one in d7...

  • catch committed ab8bce7 on 9.0.x
    Issue #3165763 by quietone, mikelutz: Combine two tests to one in d7...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 9.1.x and cherry-picked back to 8.9.x, thanks!

  • catch committed ee07182 on 8.9.x
    Issue #3165763 by quietone, mikelutz: Combine two tests to one in d7...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.