Closed (fixed)
Project:
Scheduler
Version:
2.x-dev
Component:
Testing
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
26 Nov 2021 at 15:54 UTC
Updated:
22 Oct 2022 at 12:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jonathan1055 commentedThe tests which are no longer being run are
Previously, with no testgroups filtering, the tests were executed in reverse-alphabetical class name, and these three were the last three to be executed. Now, with the testgroups filter in place, the tests are being executed in forward-alphabetical class name order. I have no idea why the change or order, probably some side-effect of how the test list is selected or reduced.
However, is it a co-incidence that these three tests would now be the first three that should be run? Is it linked to the fact that three test classes are now correctly being filtered out due to not including @group scheduler_rules_integration and somehow another three are being dropped by accident?
Comment #4
jonathan1055 commentedFirst, to elimintate the change of identifier in the .yml syntax
Comment #5
jonathan1055 commentedOK, the three tests at the top of the list are still not being run. Now see what happens if I move one of API tests back into the main Scheduler group.
Comment #6
jonathan1055 commentedSo! That's interesting. I moved EventsTest (which was running fine) out of
@group scheduler_apiinto@group scheduler. The test still runs, but now we get one of the lost/discarded testsschedulerBasicProductTestback in the list of tests being run. This was the third test (in forwards-alphabetical order) that was being discarded.The recovered test runs first, then we get the moved test, then the rest of the list in alphatbetical order. The API group has now been shifted to the end of the list. Something funny is going on.
Comment #7
jonathan1055 commentedSee what happens if the order of the two test groups in the list are changed over.
Comment #8
jonathan1055 commentedSwapping the order of the two values in
testgroupshas had an impact. We have got back the two tests at the top of the list which had been lost, but have now not run the two tests in scheduler_api group. It is as if some kind of array counter bug means that the list of tests is not being merged correctly.Comment #9
jonathan1055 commentedHere's the test comparison list that goes with #6
Comment #10
jonathan1055 commentedNow move the
EventsTestback intoscheduler_apigroup but keep the order of the two groups in the drupalci.yml parameter the same as in #8 above, i.e.testgroups: 'scheduler_api,scheduler'Comment #11
jonathan1055 commentedProbably as expected, the test that is moved back into scheduler_api is not run.
Looking at the evidence of all the tests above, one theory could be that the number of tests getting run in the group being shown second is reduced by the number being run in the first group.
Comment #12
jonathan1055 commentedThis run has only five tests in the
schedulergroup as I have moved all the others from that group into a newdo_not_rungroup. All five tests were run and none of the three in scheduler_api were run.Scheduler.Scheduler
Now going to move those last two tests into
do_not_runComment #13
jonathan1055 commentedThere are 3 tests in
schedulergroup and 3 tests inscheduler_apigroup but only the three in scheduler get run:Scheduler.Scheduler
The next change will be to move one of the running tests from
schedulerintodo_not_rungroupComment #14
jonathan1055 commentedSo now that BasicMedia is in the do_not_run group, we have 2 tests defined in
schedulerand 3 tests defined inscheduler_api. Dropping one of the running tests has allowed one of the api tests to show up. This is the "third" api test that should be run.Comment #15
jonathan1055 commentedIn the commit above I defined BasicProduct to the
do_not_rungroup. This has allowed another of the already defined scheduler_api tests to be included and run. There is now just one test defined in theschedulergroup and this is causing just one test from thescheduler_apigroup to be ignored.Comment #16
jonathan1055 commentedThis is a core bug in
core/scripts/run-tests.shand I have raised #3251817: Make run-tests.sh select all the required tests when testgroups: has more than one value to request the fix.Comment #17
jonathan1055 commentedThat's good. When my patch for
run-tests.shis applied we get the expected set of tests being run. In this cut-down example we get the four tests compared to the three in #15 above.Comment #19
jonathan1055 commentedCommited the change to drupalci.yml which applies the patch to
core/scripts/run-tests.sh. This can be removed when #3251817: Make run-tests.sh select all the required tests when testgroups: has more than one value is committed.Also moved the javascript test from
@group schedulerinto@group scheduler_jsComment #21
jonathan1055 commentedDon't want to re-open this issue, and cannot run patch tests when it is Closed.
See #3049585-7: Check drupal.org testing infrastructure for the test.