Closed (fixed)
Project:
Flag
Version:
8.x-4.x-dev
Component:
Flag core
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2018 at 23:14 UTC
Updated:
1 Apr 2018 at 20:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
martin107 commentedFound a second example of test failures, for no apparent cause.
here is breakdown of the problem, with the test artifacts
https://www.drupal.org/project/flag/issues/2945772#comment-12495283
https://www.drupal.org/pift-ci-job/893140
Comment #3
martin107 commentedI have found a clue in a ... to a least one instability in the system
This test run
https://www.drupal.org/pift-ci-job/913468
from this issue/patch/comment
https://www.drupal.org/project/flag/issues/2842386#comment-12526121
The expected and observed strings differ in ONLY the last position which is a White space....
I think we can hunt down the problem from here...
Flag.Drupal\Tests\flag\FunctionalJavascript\AjaxLinkTest
✗
Drupal\Tests\flag\FunctionalJavascript\AjaxLinkTest
fail: [Other] Line 0 of sites/default/files/simpletest/phpunit-2.xml:
PHPunit Test failed to complete; Error: PHPUnit 4.8.36 by Sebastian Bergmann and contributors.
Testing Drupal\Tests\flag\FunctionalJavascript\AjaxLinkTest
F
Time: 47.23 seconds, Memory: 3.50MB
There was 1 failure:
1) Drupal\Tests\flag\FunctionalJavascript\AjaxLinkTest::testDomUpdate
DOM update: The flag message is flashed.
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'ep|wzIG~5nnFB%d*zh7gT0.&Q+`]+C] '
+'ep|wzIG~5nnFB%d*zh7gT0.&Q+`]+C]'
/var/www/html/core/tests/Drupal/Tests/BrowserTestBase.php:1286
/var/www/html/modules/contrib/flag/tests/src/FunctionalJavascript/AjaxLinkTest.php:120
FAILURES!
Tests: 1, Assertions: 11, Failures: 1.
Comment #4
martin107 commented#3 has convinced me that we need an additional constraint to our pseudo random string.
This patch strips out white spaces and so will fix a class of apparently random test failures.
I think this patch is ready to commit.
Comment #5
socketwench commentedHuh. Didn't expect that.
Comment #7
socketwench commentedThanks, Martin!