Problem/Motivation

Core tests are randomly failing for the last 3 or so days

What's failing:

Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest

1) Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest::testPrivateFiles
Behat\Mink\Exception\ElementNotFoundException: Form field with id|name|label|value "files[settings_block_form_field_file_0]" not found.

/var/www/html/vendor/behat/mink/src/Element/TraversableElement.php:292
/var/www/html/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php:272
/var/www/html/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php:177
/var/www/html/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php:120
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

Drupal\Tests\media_library\FunctionalJavascript\WidgetOEmbedTest

1) Drupal\Tests\media_library\FunctionalJavascript\WidgetOEmbedTest::testWidgetOEmbed
"The media item has been created but has not yet been saved." not found
Failed asserting that a boolean is not empty.

/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:121
/var/www/html/vendor/phpunit/phpunit/src/Framework/Constraint/Constraint.php:55
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/MediaLibraryTestBase.php:65
/var/www/html/core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php:84
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

Drupal\Tests\media\FunctionalJavascript\MediaSourceOEmbedVideoTest

1) Drupal\Tests\media\FunctionalJavascript\MediaSourceOEmbedVideoTest::testMediaOEmbedVideoSource
Behat\Mink\Exception\ExpectationException: Current page is "/media/add/test_media_oembed_type", but "/admin/content/media" expected.

/var/www/html/core/tests/Drupal/Tests/WebAssert.php:540
/var/www/html/core/tests/Drupal/Tests/WebAssert.php:729
/var/www/html/core/modules/media/tests/src/FunctionalJavascript/MediaSourceOEmbedVideoTest.php:119
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

Drupal\FunctionalJavascriptTests\Tests\JSWebWithWebDriverAssertTest
1) Drupal\FunctionalJavascriptTests\Tests\JSWebWithWebDriverAssertTest::testJsWebAssert
Element not exists on page after too short wait.

/var/www/html/core/tests/Drupal/FunctionalJavascriptTests/Tests/JSWebAssertTest.php:46
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726

Steps to reproduce

See https://www.drupal.org/node/3060/qa

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new409 bytes
alexpott’s picture

StatusFileSize
new3.63 KB

That did not fix anything...

Status: Needs review » Needs work

The last submitted patch, 3: try-to-get-output.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new3.66 KB

Interesting with #3 we start to get all the html in artifacts...

Status: Needs review » Needs work

The last submitted patch, 5: try-to-get-output2.patch, failed testing. View results

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new3.66 KB

Let's get some more info from FilterTest

alexpott’s picture

StatusFileSize
new5.56 KB

Opps wrong patch...

The last submitted patch, 7: try-to-get-output3.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 8: try-to-get-output4.patch, failed testing. View results

alexpott’s picture

Title: Reduce JS testing concurrency to see if it solves the problem » What's going on with JS testing discovery issue
alexpott’s picture

Issue summary: View changes
alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new5.78 KB
alexpott’s picture

Issue summary: View changes
alexpott’s picture

StatusFileSize
new3.73 KB

Status: Needs review » Needs work

The last submitted patch, 15: 3315074-2-15.patch, failed testing. View results

alexpott’s picture

Issue summary: View changes
alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new5.04 KB
alexpott’s picture

StatusFileSize
new5.04 KB

Whoops miessed up the timeouts...

spokje’s picture

Status: Needs review » Reviewed & tested by the community

I was messing with this as well and also figured it has to be the waitFor being wonky.

Never got to the slowness part of it though, I think it (at the very least) will reduce failure rates.

Since this is also confirmed by the runs in #19, where now "only" MariaDB has a failure related to this, I'm going to RTBC.

The fact that MariaDB still fails means we don't have a 100% waterproof solution (yet), but seeing the massive "red streak" on the TestBot auto-run on each commit/day, I think we want this in quick to, at the very least, mitigate the massive JS test failures.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new5.38 KB

Combining with the fix for FilterTest...

Status: Needs review » Needs work

The last submitted patch, 21: 3315074-3-21.patch, failed testing. View results

spokje’s picture

MariaDB fails on WidgetUploadTest: Has no relation with the waitFor-fix in this issue and is an already frequently seen JS failure.
MySQL8 fails on AdminUiTest: Sadly this has a relationship with our "friend" waitFor through waitForElement.
Also MySQL57 fails seem related to this fix (or at least not fixed...)

So still no 100% fix, but already _much_ better than the current JS test failure storm.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new5.75 KB

I'm pretty sure the recent flood of fails are due to performance. Let's see what happens if change the 5ms wait to 50ms in assertWaitOnAjaxRequest.

Status: Needs review » Needs work

The last submitted patch, 24: 3315074-3-23.patch, failed testing. View results

alexpott’s picture

StatusFileSize
new3.66 KB

Okay now that the FilterTest patch has landed let's get some more screenshots...

alexpott’s picture

Looking at the difference between these test runs...

alexpott’s picture

Status: Needs work » Needs review
spokje’s picture

I kinda lost track of which of the randoms in the IS are already solved.
Also I'm not sure what exactly there is to review here, could be that the change to NR was just to trigger to patches to by tested by TestBot?

alexpott’s picture

alexpott’s picture

nod_’s picture

Status: Needs review » Fixed

things seems to have settled down no?

Status: Fixed » Closed (fixed)

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