Problem/Motivation
1) Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler\FilterTest::testAddingFilter
The final count was: 2
Failed asserting that false is true.
/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/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FilterTest.php:79
/var/www/html/vendor/phpunit/phpunit/src/Framework/TestResult.php:726
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | 3315227-36.patch | 2.62 KB | alexpott |
| #36 | 34-36-interdiff.txt | 946 bytes | alexpott |
| #34 | 3315227-34.patch | 2.61 KB | alexpott |
| #33 | 3315227-33.patch | 5.74 KB | alexpott |
| #29 | 3315227-28.patch | 5.4 KB | alexpott |
Comments
Comment #2
alexpottComment #5
alexpottComment #7
alexpottComment #8
alexpottComment #10
alexpottSo it was the other sleep that fixed it... interesting...
Comment #11
alexpottI wonder if this works...
Comment #13
alexpottComment #14
alexpottLet's see if only 10ms wait works.
Comment #16
alexpottComment #18
alexpottComment #19
alexpotthere's the proper ptch
Comment #20
alexpottLet's make sure we can have the smallest possible change.
Comment #21
alexpottAnd now the patch for realz...
Comment #22
andypostnot clear where
$final_countis used, moreover it's not defined in the function bodyComment #23
alexpott@andypost that was old debug code I removed the other parts of it but forgot that. Ooops.
Comment #24
alexpottI think I've worked out why this is happening! This is a slowness issue. We never do the check twice because things are going slow.. the callback in the wait here makes a tonne of requests for each td to find out if it is displayed...
Here's an implementation that I think will check twice.
Comment #25
alexpottHere's the final patch (hopefully)... I'm running the entire JS test suite with this change over on #3315074-15: What's going on with JS testing discovery issue
Comment #27
alexpottAnother idea based on old fixes...
Comment #29
alexpottWhoops miessed up the timeouts...
Comment #33
alexpottComment #34
alexpottSo I think we should consider committing this. It moves the wait fixes from #3211164: Random errors in Javascript Testing up a level so more code benefits and it ensures the callback always fires twice regardless of how long the callback takes.
Comment #35
spokjeAnnoying nit alert:
+ // If the callback has only fired once then it
Comment #36
alexpottFixed and improved the comment.
Comment #38
quietone commentedIn #34, the failure is with JSWebWithWebDriverAssertTest::testJsWebAssert. That is not listed on #2829040: [meta] Known intermittent, random, and environment-specific test failures so I was wondering if a new random error was being introduced. I searched for that test and find that it did fail in the most recent batch of random failures that occurred 21 and 22 July of this year. It is also failing random in #3315074-21: What's going on with JS testing discovery issue. So, not a new random error.
This is a definitive improvement!
Comment #39
spokjeJSWebAssertTestandJSWebWithWebDriverAssertTeststill seem to have issues, but this is overall such an improvement on the current situation that I'm going to RTBC.The troubles there seem to be based on a test that asserts if a element that should dissappear after X is still there before X has passed.
I think that's kinda a niche case where
waitForcould still fail, but that's for the next issue IMHO.Comment #41
spokjeComment #42
andypostNot sure it makes sense to commit patch which does not pass tests, the issue here is because of runner's performance and DA could move to faster instance
Comment #43
catchThe test suite shouldn't depend on how fast the test runners are though, I think we need to get this in, which should result in green along with the other change in #3315074: What's going on with JS testing discovery issue.
Comment #45
catchCommitted/pushed to 10.1.x, cherry-picked back through to 9.4.x, thanks!
Comment #46
spokje@andypost: I see what you're saying, but (at least for me) there's a difference between not green and less red.
The current JS test fail-storm is rather big. Most probably, as you said, caused by upped performance on our test-CI (damn you, progress!!!).
Looking for One-Patch-To-Rule/Greenify-Them-All, might be one step beyond, by chopping it into smaller fixes (that will still not be fully green) we might be able to get to the Goal of Green quicker.
INSTA-EDIT: Outtyped _and_ outcommitted, I'm getting too slow for this game...;)
Comment #47
alexpott@Spokje the current storm of fails is not caused by more performance. The results here show that the currently the testbot often can't call the callback here twice in 10 seconds! Whereas locally this is never an issue. Something happened to test performance on Oct 11 - not sure what and even if we're are in control of the change. There ate discussions to use a different instance type that hopefully will result in faster tests and less random fails.
Comment #48
spokje@alexpott: Ah, misinterpreted the performance the wrong way around. Thanks for clearing that up.