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.
Problem/Motivation
LocaleUpdateTest fails currently with PostgreSQL as database backend.
Proposed resolution
Identify and fix the failing tests.
Remaining tasks
Write patch.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2443633-8.patch | 806 bytes | erik.erskine |
Comments
Comment #1
bzrudi71 CreditAttribution: bzrudi71 commentedThis is because of random fails, sometimes we have pass, sometimes not. This happens locally as well as with the docker bot. Needs investigation...
Comment #2
bzrudi71 CreditAttribution: bzrudi71 commentedSetting to PP as this may be fixed by #2474909: Allow Simpletest to use the same APC user cache prefix so that tests can share the classmap and other cache objects, let's see :-)
Comment #3
bzrudi71 CreditAttribution: bzrudi71 commentedComment #4
mpdonadio@bzrudi71, can you post the fail info so we know what is happening?
Could you also try the patch in #2474909-62: Allow Simpletest to use the same APC user cache prefix so that tests can share the classmap and other cache objects to see if it helps?
Comment #5
bzrudi71 CreditAttribution: bzrudi71 commentedI tried several runs locally and on PG bot but unfortunately they all passed today ;-) Anyway there is something wrong with the test itself which needs investigation. I see as a result locally:
- 427 passes, 0 fails, 0 exceptions, 143 debug messages
and
- Drupal\locale\Tests\LocaleUpdateTest 413 passes 136 messages
on bot.
This seems okay as long as some tests only run under some circumstances in regards of PHP version or whatever. What seems not okay is that I have different results within the same environment, e.g. test bot. The result varies between runs:
- Drupal\locale\Tests\LocaleUpdateTest 413 passes 136 messages
- Drupal\locale\Tests\LocaleUpdateTest 415 passes 137 messages
- Drupal\locale\Tests\LocaleUpdateTest 413 passes 136 messages
Comment #6
bzrudi71 CreditAttribution: bzrudi71 commentedBack to active as #2474909: Allow Simpletest to use the same APC user cache prefix so that tests can share the classmap and other cache objects didn't fix the random fails...
Comment #7
erik.erskine CreditAttribution: erik.erskine as a volunteer commentedI've managed to narrow this down a bit and get intermittent (but relatively regular), test failures within the testUpdateImportSourceRemote method: (ignoring the other methods for now)
31 passes
33 passes
30 passes, 1 fail
32 passes
32 passes
32 passes
32 passes
32 passes
31 passes, 1 fail
First of all, I think the fluctuating number of passes is due to a batch operation. There's a test for valid HTML during each HTTP response, so the longer the batch takes the more requests/responses there will be, and the more passes. Not sure if that's a problem or not, but it seems like a red herring in regards to the failure.
The failures I've been getting are all related to the test for available translation updates. This page contains a list of modules, but it looks like the order is uncertain, and therefore the assertText call in LocaleUpdateTest is failing:
first run, text is:
Available translation updates | Drupal Skip to main content Drupal Available translation updates Status message Checked available interface translation updates for 5 projects. Last checked: 1 sec ago (Check manually) Language Status Update German German Show description Updates for: Contributed module one, Contributed module two, Custom module one, Locale test Contributed module one (2015-05-12)Contributed module two (2015-05-12)Custom module one (2015-05-12)Locale test (2015-05-08)Missing translations for:
second run, text is:
Available translation updates | Drupal Skip to main content Drupal Available translation updates Status message Checked available interface translation updates for 5 projects. Last checked: 1 sec ago (Check manually) Language Status Update German German Show description Updates for: Contributed module two, Locale test, Contributed module one, Custom module one Contributed module two (2015-05-12)Locale test (2015-05-08)Contributed module one (2015-05-12)Custom module one (2015-05-12)Missing translations for:
Comment #8
erik.erskine CreditAttribution: erik.erskine as a volunteer commentedLocaleUpdateTest examines the admin/reports/translations screen for modules with updated translations. Those modules can be listed in an arbitary order, so sometimes the test fails because the following text isn't matched, even though the correct modules are listed.
Here is a patch that ensures that modules are listed in alphabetical order on the admin/reports/translations screen. It should therefore make the above check reliable.
Comment #9
jaredsmith CreditAttribution: jaredsmith at Bluehost commentedI went to test the patch in comment 8, but I haven't been able to reproduce the issue today using the DrupalCI test infrastructure with PHP 5.4 and PostgreSQL 9.1 containers.
Can someone else please tell me if they're still seeing this with the latest code from HEAD?
Comment #10
jaredsmith CreditAttribution: jaredsmith at Bluehost commentedI've tested this again today, with the following combinations without the patch.
PHP 5.4 and PostgreSQL 9.1:
Drupal\locale\Tests\LocaleUpdateTest 405 passes
PHP 5.5 and PostgreSQL 9.1:
Drupal\locale\Tests\LocaleUpdateTest 405 passes
PHP 5.4 and PostgreSQL 9.4:
Drupal\locale\Tests\LocaleUpdateTest 405 passes
PHP 5.5 and PostgreSQL 9.5:
Drupal\locale\Tests\LocaleUpdateTest 405 passes
Addtionally, the bot at http://d8pgbot.erwanderbar.de/archive/results_2015_05_16.txt shows
Drupal\locale\Tests\LocaleUpdateTest 405 passes
I'm going to go ahead and close this issue as fixed, as it's obviously not happening any more. Feel free to re-open if this problem comes up again.