Our automated tests have started failing, without any change to the Scheduler code. The failures are all within the Rules tests.

For an example see https://www.drupal.org/pift-ci-job/595519
The fails are at D8.4 and 8.3, but 8.2 still passes OK. I am sure that 8.3 used to be OK, so maybe Rules module have changed something.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055 created an issue. See original summary.

jonathan1055’s picture

The error text (pasted here to allow searching on) is

PHPUnit_Framework_Exception: Fatal error: Class Drupal\rules\Ui\RulesUiDefinition contains 2 abstract methods and must therefore be declared abstract or implement the remaining methods (Drupal\Component\Plugin\Definition\PluginDefinitionInterface::id, Drupal\Component\Plugin\Definition\PluginDefinitionInterface::getProvider)
in /var/www/html/modules/contrib/rules/src/Ui/RulesUiDefinition.php on line 146

Rules module have the same failures in their own tests - see #2852231: Cache bin doesn't follow the naming convention

Our tests were passing at core 8.3 on 21st Dec and failing by 3rd Feb. As a temporary solution, I am going to make the Rules tests not run during our testing, so that we can resume normal testing and committing of code.

jonathan1055’s picture

I have raised #2854481: RulesUiDefinition must be abstract or implement two missing methods on the Rules issue queue asking for this to be fixed.

jonathan1055’s picture

Status: Active » Needs review
FileSize
3.51 KB

Patch to make the Rules tests non-discoverable and hence not run. This is a temporary change, to get our automated tests passing again.

Status: Needs review » Needs work

The last submitted patch, 4: 2851618-4.temporarily_remove_rules_tests.patch, failed testing.

jonathan1055’s picture

Status: Needs work » Needs review
FileSize
70.36 KB

The tests failed due to
Warning: No tests found in class "Drupal\Tests\scheduler\Functional\SchedulerRulesActionsTest".
Yes I knew that! I have not found a way to just comment out the test functions or make them not run. Hence going to rename the three files from .php to .txt so they still exist but will not be detected and run during tests.

  • jonathan1055 committed 31c3974 on 8.x-1.x
    Issue #2851618 by jonathan1055: Temporarily remove Rules automated tests...

  • jonathan1055 committed 16d4b33 on 8.x-1.x
    Issue #2851618 by jonathan1055: Correct the renaming of Rules Conditions...

  • jonathan1055 committed cfa4c52 on 8.x-1.x
    Issue #2851618 by jonathan1055: Add comment and TODO to the three Rules...
jonathan1055’s picture

Status: Needs review » Postponed

Good. We now have all passing tests in the committed codebase.

This issue is now postponed, waiting on #2854481: RulesUiDefinition must be abstract or implement two missing methods after which we can reinstate our Rules tests.

kmajzlik’s picture

jonathan1055’s picture

Thanks karlos007,
The Rules patch on #2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition seems good. It fixes the installation error and automated testing. Hope it can be committed to Rules soon.

Stephen Ollman’s picture

Nice Work!!!

jonathan1055’s picture

Status: Postponed » Needs review
FileSize
72.27 KB

#2849779: Implement missing PluginDefinitionInterface methods in RulesUiDefinition has been committed to Rules dev code on d.o.
This patch restores our three test files.

Status: Needs review » Needs work

The last submitted patch, 14: 2851618-14.restore_rules_tests.patch, failed testing.

jonathan1055’s picture

Status: Needs work » Needs review
FileSize
72.6 KB

ActionsTest was missed due to a typo, I had EventsTest in the patch twice. Try again.

Status: Needs review » Needs work

The last submitted patch, 16: 2851618-16.restore_rules_tests.patch, failed testing.

jonathan1055’s picture

Status: Needs work » Needs review

Ah. Testing on D.O. uses the tagged releases of dependency modules

07:52:15 DCI_AdditionalRepositories= ... git,git://git.drupal.org/project/rules.git,8.x-3.0-alpha2 ....

So the tests fail just as before, because it uses the alpha2 release. Using the dev Rules code would now pass.

jonathan1055’s picture

#2880164: Make new Rules release 8.x-3.0-alpha3 is fixed so the Scheduler rules tests should pass now. This patch restores the three test files.

  • jonathan1055 committed bfd2288 on 8.x-1.x
    Issue #2851618 by jonathan1055: Rules automated tests fail at D8.3 and 8...
jonathan1055’s picture

Status: Needs review » Fixed

The tests on drupal.org use //git.drupal.org/project/rules.git,8.x-3.0-alpha3so our tests now pass.
Fixed.

jonathan1055’s picture

Assigned: jonathan1055 » Unassigned

Unassigning.

Status: Fixed » Closed (fixed)

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

jonathan1055’s picture

I've removed the @todo comments at the top of each test file, which got left in accidentally.

The commit auto-comment does not seem to be generated (maybe when the issue is closed?) so here is the commit