Problem/Motivation
1)
Drupal\Tests\node\FunctionalJavascript\SettingSummariesContentTypeTest::testWorkflowSummary
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'Not published, Promoted to front page, Sticky at top of lists, Create new
revision'
+'Not published, Promoted to front page, Create new revision'
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/Constraint/Equality/IsEqual.php:96
/builds/project/drupal/core/modules/node/tests/src/FunctionalJavascript/SettingSummariesContentTypeTest.php:53
/builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728
FAILURES!
Tests: 1, Assertions: 9, Failures: 1.
Steps to reproduce
Proposed resolution
After each field is checked or unchecked the summary should be updated a few milliseconds later. In the test we are unchecking the status field before checking all the other ones. Then we wait for the summary to say "Not published", but this is likely happening before the summary is updated from the final checkbox. We should instead wait for the summary to include the full string we're expecting.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3393137-500.patch | 1.75 KB | catch |
| #3 | 3393137-500.patch | 1.74 KB | catch |
| #2 | 3393137-500.patch | 1.75 KB | catch |
Issue fork drupal-3393137
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3393137-repeat
changes, plain diff MR !11840
- 3393137-random-test-failure
changes, plain diff MR !5891
Comments
Comment #2
catchComment #3
catchComment #4
catchComment #5
catchThe sqlite failures aren't the one we're looking for, this might be gitlab specific, or require a lot more runs.
Comment #6
catchComment #9
mstrelan commentedRebased and updated the MR with a suggested fix, updated proposed resolution.
Comment #10
smustgrave commentedSeems like a good refactor so saw we try it out.
Comment #11
catchThis could use some multiple test runs to confirm it removes the random failure.
Comment #13
mstrelan commentedRan it 7000 times without the fix and couldn't get it to fail.
1000x https://git.drupalcode.org/issue/drupal-3393137/-/jobs/4978095
1000x https://git.drupalcode.org/issue/drupal-3393137/-/jobs/4978103
5000x https://git.drupalcode.org/issue/drupal-3393137/-/jobs/4978177
Maybe it's less frequent now or doesn't happen at all. Guess we just leave this until we see it in the wild again?
Comment #14
catchhmm. I think as long as the new version is reliable, it's more readable/tidy, so we could go ahead anyway?
Comment #15
mstrelan commentedFine by me, restoring status from #10 since nothing has changed to review.
Comment #17
catchHas the new version been run multiple times?
Comment #18
mstrelan commentedI used the fancy new REPEAT_COUNT var to run the new version 1000 times - https://git.drupalcode.org/issue/drupal-3393137/-/jobs/4978074
Comment #20
catchNice, thanks for running all these.
Committed/pushed to 11.x, thanks!