Problem/Motivation

https://git.drupalcode.org/project/drupal/-/jobs/161498

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

CommentFileSizeAuthor
#4 3393137-500.patch1.75 KBcatch
#3 3393137-500.patch1.74 KBcatch
#2 3393137-500.patch1.75 KBcatch

Issue fork drupal-3393137

Command icon 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:

Comments

catch created an issue. See original summary.

catch’s picture

StatusFileSize
new1.75 KB
catch’s picture

StatusFileSize
new1.74 KB
catch’s picture

StatusFileSize
new1.75 KB
catch’s picture

The sqlite failures aren't the one we're looking for, this might be gitlab specific, or require a lot more runs.

catch’s picture

Title: Random test failure in SettingSummariesContentTypeTest::testWorkflowSummary » [random test failure] SettingSummariesContentTypeTest::testWorkflowSummary

mstrelan made their first commit to this issue’s fork.

mstrelan’s picture

Issue summary: View changes
Status: Active » Needs review

Rebased and updated the MR with a suggested fix, updated proposed resolution.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Seems like a good refactor so saw we try it out.

catch’s picture

Status: Reviewed & tested by the community » Needs review

This could use some multiple test runs to confirm it removes the random failure.

mstrelan’s picture

catch’s picture

hmm. I think as long as the new version is reliable, it's more readable/tidy, so we could go ahead anyway?

mstrelan’s picture

Status: Needs review » Reviewed & tested by the community

Fine by me, restoring status from #10 since nothing has changed to review.

mstrelan changed the visibility of the branch 3393137-repeat to hidden.

catch’s picture

Has the new version been run multiple times?

mstrelan’s picture

I used the fancy new REPEAT_COUNT var to run the new version 1000 times - https://git.drupalcode.org/issue/drupal-3393137/-/jobs/4978074

  • catch committed ee52c1c9 on 11.x
    Issue #3393137 by catch, mstrelan: [random test failure]...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Nice, thanks for running all these.

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

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