WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#42263 closed defect (bug) (duplicate)

Remove seconds from test_get_gmt_from_date_string_date()

Reported by: SergeyBiryukov Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description

test_get_gmt_from_date_string_date() causes occasional random failures if a second has passed between strtotime( 'now' ) and get_gmt_from_date() calls:

1) Tests_Formatting_Date::test_get_gmt_from_date_string_date
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'2017-10-18 18:18:12'
+'2017-10-18 18:18:13'

I'd suggest removing seconds from this test, as it doesn't need that kind of precision, it just needs to make sure the timezone is correct.

Change History (2)

#1 @SergeyBiryukov
4 years ago

Introduced in [35284].

#2 @SergeyBiryukov
4 years ago

  • Milestone 4.9 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #38815.

Note: See TracTickets for help on using tickets.