Closed (fixed)
Project:
Simplenews
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Oct 2016 at 15:35 UTC
Updated:
9 Mar 2019 at 12:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
ModernMantra commentedOn line
281inSimplenewsSendTesti placed the value to bewjBX]>&d&dand i did not get any failures on local machine (test bot on another issue fails on that case). Also tried with sample from test bot fail"K?*>>&and no fails at all on local machine. Strange, or i have done something wrongly...Comment #3
miro_dietikerLet's try if testbot also fails?
Comment #4
miro_dietikerAnd if this doesn't fail, we should try to encode it, it might get decoded accidentally somewhere.
Comment #5
ModernMantra commentedTests are ran many times and no single failure. I am suspicious about quotation mark since in test both failures string that is 'something common'
wjBX]>&d&d'"K?*>>&. Uploaded 'dummy' patch just to trigger test bot and see failures... cases...Comment #7
miro_dietikerRetriggering tests...
For reference, these are the previous failing runs:
https://www.drupal.org/pift-ci-job/509973
https://www.drupal.org/pift-ci-job/509871
Comment #8
miro_dietikerHm, the SQLite just failed 3 out of 4 times...
The others pass mostly passed, only mysql with 5.5 and 8.3 failed once.
Still strange, i was hoping to find fully consistent behavior...
Comment #9
berdirThose are two different kinds of fails. The second one actually has a @todo related to https://www.drupal.org/node/2575791, so maybe the strip tags behavior is not consistent.
Comment #10
adamps commented2 years on, the details of which tests are failing are probably different, but the problem still exists. Here is a patch that should solve the two that failed in the most recent run https://www.drupal.org/pift-ci-job/1192925.
1) SimplenewsAdministrationTest: the user is displayed as a link, so fix the tests to match (presumably this one fails always, not just randomly).
2) SimplenewsSourceTest: the problem comes from different HTML encodings, in particular whether to encode quotes. The mail text has legitimately chosen not to (because it isn't strictly necessary);
HTML::encodeencodes them anyway (because that's a safe thing to do). So comparing encoded values is not a good idea because there are many different alternative correct encodings. The solution is to compare decoded values rather than encoded values.Comment #11
berdirseen this before in other cases, I think this is a permission thing/change.
Comment #13
adamps commentedI can't reproduce the failure reported in #12.
No doubt you are right. The question is: in what way does it change?
I can see there is still uncertainty, but I feel that my patch takes us forward. It might solve 2 problems and, if not, it gives us more information. On the other hand, the existing code failing again and again each night is telling us nothing new.
Please would you commit my patch so we can see what happens? I can follow up with more patches based on what we learn. It might take a few iterations, but we'll get this solved in the end.
Comment #14
berdirCommitted the change, I think this is fine.
Still some more issues but hopefully non-frequent randoms, we'll see.
Comment #16
berdirRe-opening, https://www.drupal.org/node/26416/qa shows varying results. some branches passed, others did not (PHP 7.3 is mostly core issues)
Comment #17
berdirI think the a/span change is something that changes in 8.7, so it is failing on 8.6. Maybe we can make the condition flexible enough to work with both a and span. See #3025597: Fix failing tests how I did that for TMGMT.
Comment #18
berdirFor now I changed the patch/issue test configuration back to 8.7, I usually prefer to set it to pre-release.
Comment #19
adamps commentedMany thanks @Berdir
#17 is a good fallback option, but I would prefer to pin the tests down. It seems like this should be a link, and maybe there's a bug if it's not. Here is an attempt to give extra permission just in case.
Comment #20
berdirYes, it might be related to your work in core around administer user permssions?
Comment #21
adamps commentedDarn, the 8.6 one still failed. I'll do some more investigation.
Yes, this one #2921114: Username formatter ignores entity access.
Comment #22
adamps commentedTricky as patch #19 works locally on D8.6.
Randomly trying a different permission in case that works.
Comment #23
adamps commentedHurrah! Hopefully that's the end of this tedious issue - please can this be committed?
Comment #24
adamps commentedOoops hold on, that test was D8.7. Just queued D8.6.
Comment #25
adamps commentedBah:-(
Comment #26
adamps commentedOK back to suggestion in #17
Comment #28
adamps commentedComment #30
adamps commentedComment #31
adamps commentedYay at last, thank goodness I was bored of that issue. This should get all the tests back working, please commit.
Comment #32
berdirThanks, committed.
Comment #34
adamps commentedThe status and assigned fields sometimes appear with the wrong values on my system, so let's try saving again.