entity.test defines 11 test classes:

EntityAPITestCase
EntityAPIRulesIntegrationTestCase
EntityAPICommentNodeAccessTestCase
EntityAPIi18nItegrationTestCase
EntityMetadataTestCase
EntityMetadataNodeAccessTestCase
EntityMetadataNodeCreateAccessTestCase
EntityMetadataNodeRevisionAccessTestCase
EntityMetadataTaxonomyAccessTestCase
EntityTokenTestCase
EntityMetadataIntegrationTestCase

but the Drupal CI test output clearly shows that only 9 of these are being executed. See for example the most recent test output at https://dispatcher.drupalci.org/job/drupal_d7/140141/console (scroll to the bottom and you will see the test cases that were run are highlighted in green).

I don't know when the problem first appeared, but apparently it has been this way for many years.

The two test cases that are NOT being run are:

EntityAPIRulesIntegrationTestCase
EntityAPIi18nItegrationTestCase

These test cases exercise code which is not tested anywhere else in the Entity API. Specifically, entity.features.inc is not used by Entity API tests but IS used by Rules. And entity.features.inc does not work with PHP 8.0, which we are totally ignorant of because it is never tested.

I believe this problem is because entity.info is missing test_dependencies[] declarations for rules and i18n_string.

Adding a test_dependencies[] in a patch is a problem for Drupal CI. A new test_dependencies[] needs to be committed FIRST before it works in the testbot, so I will be using this issue to experiment with this.

Comments

TR created an issue. See original summary.

tr’s picture

Status: Active » Needs review
StatusFileSize
new2.28 KB

Here's the patch I propose to commit without review. This adds the test_dependencies[]. After this is committed, we will be able to see if this allows the testbot to execute those two missing test cases. If that doesn't work, I'll revert the commit.

Note that the changes in this patch won't be seen by the testbot, so when the tests run green that doesn't mean anything ...

tr’s picture

StatusFileSize
new1.63 KB

Whoops, I did not mean to include modules/field.info.inc in this patch. That was part of another issue I was testing.

Here's the patch I intended.

  • TR committed 8068b77 on 7.x-1.x
    Issue #3222088 by TR: Some test cases are not being executed
    
tr’s picture

Status: Needs review » Fixed

Drupal CI output shows all 11 test cases are now being executed now that #3 has been committed.

See https://dispatcher.drupalci.org/job/drupal_d7/148073/console

Status: Fixed » Closed (fixed)

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

joseph.olstad’s picture

this change OR probably more likely #3023044: error in entity_property_verbatim_get
may have exposed a test fail in php 8.0

see https://www.drupal.org/pift-ci-job/2168152

so therefore we need a fix for php 8.0:

#3023044: error in entity_property_verbatim_get

tr’s picture

These tests cases were never being run. They are now being run.

Yes, the Rules test fails in PHP 8.0 unless you use the -dev version of Rules where that failure is fixed. That does not mean that anything about this commit was wrong.

joseph.olstad’s picture

gotcha thanks for clarifying, yes I had a look at the rules module, I don't see any obvious problem , hopefully someone fixes it , I didn't see any patches available either.