Make WordPress Core

Opened 19 months ago

Closed 7 months ago

#38815 closed defect (bug) (fixed)

Race conditions in Tests_Formatting_Date

Reported by: ocean90 Owned by: SergeyBiryukov
Milestone: 4.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:


Same as #38381 but for Tests_Formatting_Date.

Example: Tests_Formatting_Date::test_get_gmt_from_date_string_date() in https://travis-ci.org/aaronjorbin/develop.wordpress/jobs/176355621#L295

Attachments (1)

38815.patch (1017 bytes) - added by keesiemeijer 18 months ago.
Add a delta for comparing timestamps

Download all attachments as: .zip

Change History (5)

18 months ago

Add a delta for comparing timestamps

#1 @keesiemeijer
18 months ago

  • Keywords has-patch added; needs-patch removed

in 38815.patch I've also removed strtotime( 'now' ) from the timestamp parameter in gmdate() as it defaults to the current local time if a timestamp is not given.

Last edited 18 months ago by keesiemeijer (previous) (diff)

#2 @SergeyBiryukov
7 months ago

#42263 was marked as a duplicate.

#3 @SergeyBiryukov
7 months ago

  • Milestone changed from Future Release to 4.9

#4 @SergeyBiryukov
7 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 41920:

Date/Time: Use delta comparison in get_gmt_from_date() tests to avoid race conditions.

Props keesiemeijer.
Fixes #38815.

Note: See TracTickets for help on using tickets.