Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
18 Mar 2022 at 12:14 UTC
Updated:
5 Apr 2022 at 18:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
spokjeComment #4
catchLooks good.
Comment #5
xjmWe're losing test coverage here. Shouldn't we add a legacy test that explicitly tests this for deprecated modules, if we skip them here?
Comment #6
spokjeComment #7
spokjeMakes sense, attempted to add that legacy test.
Comment #8
spokjeComment #9
catchTest failures look real.
Comment #10
spokjeI would argue that even The Struggle is real, but at the very least I've made another stab to fix the test failures
Comment #11
spokjeComment #12
spokjeTesting the plain diff from the current MR on
9.4.x-devwhich actually has a deprecated module (HAL).Comment #13
murilohp commentedThe test looks good! Commenting here because for some reason if I comment only on the MR, the issue is not automatically followed.
Comment #14
spokjeThanks for the review @murilohp!
I've changed (and resolved) one of your threads, and left an explanation in the other.
Hope the helps, if not: Just leave a remark :)
Added a new plain diff from the current state of the MR for testing against
9.4.x-dev.Comment #15
murilohp commentedThe patch looks good to me! The testbot is happy and all the threads were addressed, so it's RTBC!
Comment #17
catchI didn't know you could use @group legacy on methods that aren't the actual test, that's clever.
Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
Comment #18
xjmMe neither -- neat!
Comment #19
murilohp commentedSorry for coming back here and say that unfortunately this will not solve the problem :(, testing here using the parent issue branch, we still see the deprecation notice.
Comment #20
spokjeWay too clever as it turns out, this is just not working, as @murilohp discovered.
The testing against
9.4.x-devwas moot, since at this point only hal is deprecated and that module doesn't have a configure route, meaning this test was skipped before installing it.(When something seems to good to be true, it probably isn't...)
So, I've re-opened this one and made separate test methods for deprecated and non-deprecated modules.
Running it locally against #3267458: Deprecate aggregator module in Drupal 9.4 worked for me.
Writing a test to test a test seems a bit much, but I've been wrong before...
(...basically all comments in this issue)
Comment #21
longwaveThe code works and I ran the tests locally to confirm with and without the aggregator patch.
I do wonder if we should open a followup to pre-filter in the data provider, rather than skipping most of the tests? Locally it takes over two minutes to run but over 75% of the tests are skipped so this is a lot of wasted setup (not as bad as if they were functional tests, but still):
Comment #23
catchThis explains how we'd never thought of it before ;)
Yep was thinking the same with the data provider. I think we discussed that already in another issue, but I can't remember where or if there's already a follow-up, so I opened #3271010: Add stable/deprecated versions of coreModuleListDataProvider.
Committed/pushed to 10.0.x and cherry-picked to 9.4.x, thanks!
Comment #25
spokje