Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 296021

Intermittent test fails in LocaleUpdateTest::testUpdateImportSourceRemote()

$
0
0

Problem/Motivation

Drupal\locale\Tests\LocaleUpdateTest->testUpdateImportSourceRemote() at line 150 with assertion message "Updates for Contrib module one".

The test asserts using the wrong timestamp. If the timestamps timestampNow and timestampNew set in \Drupal\locale\Tests\LocaleUpdateBase::setUp() the assert will fail. To reproduce the fail change your system clock to whatever time it would be exactly midnight in UTC+10 (for me that was 14:00:00). This is because in WebTestBase::setup() we do...

    // Set an explicit time zone to not rely on the system one, which may vary
    // from setup to setup. The Australia/Sydney time zone is chosen so all
    // tests are run using an edge case scenario (UTC+10 and DST). This choice
    // is made to prevent time zone related regressions and reduce the
    // fragility of the testing system in general. This is also set in config in
    // \Drupal\simpletest\WebTestBase::initConfig().
    date_default_timezone_set('Australia/Sydney');

Proposed resolution

Use correct timestamp in assert.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None


Viewing all articles
Browse latest Browse all 296021

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>