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.

CommentFileSizeAuthor
#8 2443633-8.patch806 byteserik.erskine
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bzrudi71’s picture

This is because of random fails, sometimes we have pass, sometimes not. This happens locally as well as with the docker bot. Needs investigation...

bzrudi71’s picture

mpdonadio’s picture

@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?

bzrudi71’s picture

I 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

bzrudi71’s picture

erik.erskine’s picture

I'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:

erik.erskine’s picture

Status: Active » Needs review
FileSize
806 bytes

LocaleUpdateTest 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.

Updates for: Contributed module one, Contributed module two, Custom module one, Locale test

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.

jaredsmith’s picture

I 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?

jaredsmith’s picture

Status: Needs review » Closed (cannot reproduce)

I'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.