Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#14 | 2863268-14.patch | 1.12 KB | Lendude |
#14 | interdiff-2863268-10-14.patch | 613 bytes | Lendude |
#11 | convert_web_tests_to-2863268-10.patch | 1.51 KB | michielnugter |
#6 | convert_web_tests_to-2863268-6.patch | 1.54 KB | nlisgo |
Comments
Comment #2
nlisgo CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: nlisgo commentedComment #5
Lendude@nlisgo could you reroll the patch with -M?
Comment #6
nlisgo CreditAttribution: 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 CreditAttribution: 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 CreditAttribution: nlisgo commentedComment #10
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic 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 CreditAttribution: michielnugter as a volunteer and at Synetic 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 CreditAttribution: michielnugter as a volunteer and at Synetic 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 CreditAttribution: michielnugter as a volunteer and at Synetic 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 CreditAttribution: michielnugter as a volunteer and at Synetic 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 CreditAttribution: michielnugter as a volunteer and at Synetic 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.