Comments

podarok created an issue. See original summary.

podarok’s picture

Title: PHP 5.6 tests are broken for Date. Needs fix. » PHP 5.4,5.5,5.6 tests are broken for Date. Needs fix.
anpolimus’s picture

Will take a look today.

anpolimus’s picture

StatusFileSize
new436 bytes
anpolimus’s picture

Status: Active » Needs review

bot up

anpolimus’s picture

StatusFileSize
new436 bytes
anpolimus’s picture

bot up

Status: Needs review » Needs work

The last submitted patch, 6: date_tests-26466446-2.patch, failed testing.

The last submitted patch, 6: date_tests-26466446-2.patch, failed testing.

anpolimus’s picture

StatusFileSize
new1.97 KB
anpolimus’s picture

Status: Needs work » Needs review

bot up

Status: Needs review » Needs work

The last submitted patch, 11: test_fix-2646646.patch, failed testing.

The last submitted patch, 11: test_fix-2646646.patch, failed testing.

anpolimus’s picture

StatusFileSize
new2.25 KB
anpolimus’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 15: test_fix-2646646-2.patch, failed testing.

podarok’s picture

Status: Needs work » Needs review

bot up

anpolimus’s picture

As we can see, tests for date module are written for PHP 5.3 and are failing at greater versions.
Now, we have to rebuild failed test for getting them working properly at PHP >=5.4

anpolimus’s picture

Status: Needs review » Needs work

The last submitted patch, 15: test_fix-2646646-2.patch, failed testing.

Stevel’s picture

Title: PHP 5.4,5.5,5.6 tests are broken for Date. Needs fix. » Tests are broken
StatusFileSize
new1.91 KB

The tests are currently broken mostly because of the new 'administer fields' permission introduced with Drupal 7.50. This patch tries to fix at least that.

Stevel’s picture

Status: Needs work » Needs review
Stevel’s picture

StatusFileSize
new2.71 KB

Testbot returns green, but locally I still have errors because of the timezone tests (tz_handling utc), maybe because the server timezone is not UTC? Adding Europe/Dublin as per #15

Stevel’s picture

Title: Tests are broken » Tests are broken on Drupal 7.50

Further testing shows that the tests do work locally if the site running the testbot has the default timezone set to UTC, but not when it's set to something else. I'll file a new bug for this, so let's stick with #22 on this one.

Edit: #24 still increases test coverage, so it's still better than #22.

Stevel’s picture

damienmckenna’s picture

Latest core codebase, latest Date git codebase, PHP 5.6.10.

Relevant PHP settings:

date/time support => enabled
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => Europe/Berlin => Europe/Berlin

Before the patch:

Date API 108 passes, 0 fails, and 0 exceptions
Date Field 68 passes, 12 fails, 4 exceptions, and 25 debug messages
Date Form test 3 passes, 0 fails, 0 exceptions, and 1 debug message
Date Migration 23 passes, 0 fails, 0 exceptions, and 2 debug messages
Date Repeat Form 929 passes, 3859 fails, 390 exceptions, and 397 debug messages
Date Repeat 33 passes, 0 fails, and 0 exceptions
Timezone & Granularity 59 passes, 8 fails, 3 exceptions, and 20 debug messages
Date Tools 22 passes, 4 fails, 1 exception, and 7 debug messages
Field UI 26 passes, 4 fails, 2 exceptions, and 9 debug messages
Date Validation 26 passes, 4 fails, 2 exceptions, and 9 debug messages
Date Views - Popup Test 35 passes, 0 fails, 0 exceptions, and 11 debug messages
Date views pager skipping test 38 passes, 0 fails, 0 exceptions, and 12 debug messages

After the patch:

Date API 108 passes, 0 fails, and 0 exceptions
Date Field 230 passes, 0 fails, 0 exceptions, and 85 debug messages
Date Form test 3 passes, 0 fails, 0 exceptions, and 1 debug message
Date Migration 23 passes, 0 fails, 0 exceptions, and 2 debug messages
Date Repeat Form 3328 passes, 0 fails, 0 exceptions, and 670 debug messages
Date Repeat 33 passes, 0 fails, and 0 exceptions
Timezone & Granularity 1178 passes, 9 fails, 0 exceptions, and 458 debug messages
Date Tools 28 passes, 0 fails, 0 exceptions, and 9 debug messages
Field UI 193 passes, 0 fails, 0 exceptions, and 74 debug messages
Date Validation 296 passes, 0 fails, 0 exceptions, and 103 debug messages
Date Views - Popup Test 35 passes, 0 fails, 0 exceptions, and 11 debug messages
Date views pager skipping test 38 passes, 0 fails, 0 exceptions, and 12 debug messages

damienmckenna’s picture

Testing again after changing the timezone to UTC.

Date-related settings:

date/time support => enabled
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => UTC => UTC

Test results:

Date API 108 passes, 0 fails, and 0 exceptions
Date Field 230 passes, 0 fails, 0 exceptions, and 85 debug messages
Date Form test 3 passes, 0 fails, 0 exceptions, and 1 debug message
Date Migration 23 passes, 0 fails, 0 exceptions, and 2 debug messages
Date Repeat Form 3328 passes, 0 fails, 0 exceptions, and 670 debug messages
Date Repeat 33 passes, 0 fails, and 0 exceptions
Timezone & Granularity 1178 passes, 9 fails, 0 exceptions, and 458 debug messages
Date Tools 28 passes, 0 fails, 0 exceptions, and 9 debug messages
Field UI 193 passes, 0 fails, 0 exceptions, and 74 debug messages
Date Validation 296 passes, 0 fails, 0 exceptions, and 103 debug messages
Date Views - Popup Test 35 passes, 0 fails, 0 exceptions, and 11 debug messages
Date views pager skipping test 38 passes, 0 fails, 0 exceptions, and 12 debug messages

So what's the problem with timezones? Is it #998076: Problem with timezone handling (caused by date_get_timezone_db returning only UTC) or #2775223: Timezone tests fail if site timezone is not UTC or something else? With so many problems in the codebase, and open issues with patches, it's hard to tell.

damienmckenna’s picture

StatusFileSize
new4.69 KB
new2.24 KB
damienmckenna’s picture

Testing the new patch.

Date-related settings:

date/time support => enabled
date.default_latitude => 31.7667 => 31.7667
date.default_longitude => 35.2333 => 35.2333
date.sunrise_zenith => 90.583333 => 90.583333
date.sunset_zenith => 90.583333 => 90.583333
date.timezone => UTC => UTC

Test results:

Date API 108 passes, 0 fails, and 0 exceptions
Date Field 230 passes, 0 fails, 0 exceptions, and 85 debug messages
Date Form test 3 passes, 0 fails, 0 exceptions, and 1 debug message
Date Migration 23 passes, 0 fails, 0 exceptions, and 2 debug messages
Date Repeat Form 3328 passes, 0 fails, 0 exceptions, and 670 debug messages
Date Repeat 33 passes, 0 fails, and 0 exceptions
Timezone & Granularity 1187 passes, 0 fails, 0 exceptions, and 458 debug messages
Date Tools 28 passes, 0 fails, 0 exceptions, and 9 debug messages
Field UI 193 passes, 0 fails, 0 exceptions, and 74 debug messages
Date Validation 296 passes, 0 fails, 0 exceptions, and 103 debug messages
Date Views - Popup Test 35 passes, 0 fails, 0 exceptions, and 11 debug messages
Date views pager skipping test 38 passes, 0 fails, 0 exceptions, and 12 debug messages

Thanks @Stevel for your work, it seems to fix the problems!

damienmckenna’s picture

Title: Tests are broken on Drupal 7.50 » Tests are broken on current 7.x-2.x branch
Status: Needs review » Reviewed & tested by the community

I'm going to RTBC this based on the premise it's all work by other people, I just pulled in an extra change from @Stevel with the last patch, but it was again Stevel's work not mine.

Great work everyone! Hopefully a maintainer will be able to commit this and we'll be able to get back to making other patches pass their tests too.

damienmckenna’s picture

  • vijaycs85 committed fdb7029 on 7.x-2.x authored by Stevel
    Issue #2646646 by anpolimus, Stevel, DamienMcKenna: Tests are broken on...
vijaycs85’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.