Closed (fixed)
Project:
Drupal core
Version:
8.4.x-dev
Component:
tracker.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Mar 2017 at 11:26 UTC
Updated:
30 Apr 2017 at 19:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nlisgo commentedFollowing the steps to convert the one test file Drupal\tracker\Tests\TrackerTest to Drupal\Tests\tracker\Functional\TrackerTest was mostly successful but fails on only one assertion:
Comment #3
nlisgo commentedWithout the resetAll and rebuildContainer then the user_hooks_test_user_format_name_alter hook was not registered. Installing the module user_hooks_test alone was not enough.
As instructed by @Lendude I have left the views simpletests in place.
Comment #4
nlisgo commentedComment #5
lendude@nlisgo could you reroll the patch with -M?
Comment #6
nlisgo commentedComment #7
pfrenssenUnder which conditions was this happening? When I run the test on the latest 8.4.x it works fine without
$this->resetAll()and$this->rebuildContainer().The patch looks fine!
Comment #8
nlisgo commented@pfrenssen when I switched the test to phpunit it did not work without the resetAll and rebuildContainer.
Without this the user_hooks_test_user_format_name_alter hook did not fire.
Comment #9
nlisgo commentedComment #10
michielnugter commentedI tested the patch and for me the rebuildContainer() wasn't required to make it work, the resetAll() was required though.
I tried changing:
To use the local container:
But that didn't improve it. It really seems like the resetAll() is required now.
Comment #11
michielnugter commentedComment #12
pfrenssenOK, fair enough, for me it worked without those additional lines, maybe it's the PHP version or something.
Comment #13
alexpottI think we really need to understand why the conversion to BrowserTestBase necessitates this change. For the people where the tests doesn't work without it - does the Simpletest WebTestBase pass locally or does it fail?
Comment #14
lendude@alexpott yeah figuring it out now makes sense.
Here is the patch without any additional clearing. It works for me fine when running PHP7.0.13 but lets run this on a couple of different PHP versions on D.O. and see what happens here.
Comment #16
lendudeOk so it fails on 7.1, but not 7.0. @nlisgo did you run 7.1? Can't remember.
Queued #11 for 7.1 too, and lets see what that does.
Comment #17
michielnugter commentedInteresting, I was running PHP 7.1, maybe it's related to that. I have similar problems with the DisplayTest test in the views_ui conversion (#2747167: Convert first part of web tests of views_ui), going to try without the resetAll() on the testbot as well.
Comment #18
lendudeOk so with only the resetAll it still fails on 7.1, testing #6 on 7.1 and lets see it that passes with both extra operations
Comment #19
michielnugter commentedAll fails on 7.1 seem out of scope of this issue as they are for OptionsFieldUITest and nothing in the patch changed anything that could make this test fail right?
Everything this test changes, passes in all versions thus the resetAll() doesn't seem required for the testbot. I am curious though why it seems required locally, will try to dig deeper into this.
Comment #20
lendudeHa! Well spotted @michielnugter, yeah that fail on 7.1 looks unrelated. So the patch #14 should be the way to go.
Comment #21
michielnugter commentedHEAD isn't broken though on these tests, I still want that figured out before setting on RTBC again, feels like a risk otherwise.
Comment #22
lendude07:12:05 Segmentation fault (core dumped)
07:12:05 FATAL Drupal\Tests\options\Functional\OptionsFieldUITest: test runner returned a non-zero error code (139).
07:12:05 Drupal\Tests\options\Functional\OptionsFieldUITest 0 passes 1 fails
See #2829040: [meta] Known intermittent, random, and environment-specific test failures and point 5 under 'If your patch has an unexpected test failure', just added by xjm. So it would seem the fails are unrelated....
Comment #23
dawehnerI triggered a couple of test failures, I think we can be sure that its safe?
Comment #24
lendudeYeah I think that this is safe, just weird that at some point it seemed to be triggering seg faults in other tests, but I don't really see how that can be caused by moving two files.
Comment #25
michielnugter commentedRerunning tests for each php version again, if it holds up I'll RTBC.
Comment #26
dawehnerAll of them went green.
Comment #27
alexpottCommitted and pushed 5ed519d to 8.4.x and c631b5e to 8.3.x. Thanks!
Backported to 8.3.x because this is tests only and keeps the two active branches in sync.