Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nfc] [test] Skip testGetFromTo on date transition #14472

Merged
merged 1 commit into from
Jun 7, 2019

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Makes a test that is known to be unreliable when run right on midnight skip if being run at that time.

Before

Test intermittently fails

After

Test intermittently skipped

Technical Details

This avoids fails when the expectations were calculated right at the end of a day but then are compared with the new day's values.

Results in this case look like

CRM_Report_FormTest::testGetFromTo with data set #1 ('20190606000000', '20190606235959', 'this.day', '', '')
fail on data set [ this.day , , ]. Local php time is 2019-06-07 00:00:13 and mysql time is 2019-06-07 00:00:13
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
Array (

  • 0 => '20190606000000'
  • 1 => '20190606235959'
  • 0 => '20190607000000'
  • 1 => '20190607235959'

Comments

I don't think there is value in making the test handle this better - skipping feels right

This avoids fails when the expectations were calculated right at the end of a day but then are compared with the new day's values.

Results in this case look like

CRM_Report_FormTest::testGetFromTo with data set #1 ('20190606000000', '20190606235959', 'this.day', '', '')
fail on data set [ this.day ,  ,  ]. Local php time is 2019-06-07 00:00:13 and mysql time is 2019-06-07 00:00:13
Failed asserting that two arrays are equal.
--- Expected
+++ Actual
@@ @@
 Array (
-    0 => '20190606000000'
-    1 => '20190606235959'
+    0 => '20190607000000'
+    1 => '20190607235959'
@civibot
Copy link

civibot bot commented Jun 7, 2019

(Standard links)

@civibot civibot bot added the master label Jun 7, 2019
@eileenmcnaughton eileenmcnaughton changed the title Skip testGetFromTo on date transition [nfc] [test] Skip testGetFromTo on date transition Jun 7, 2019
@colemanw colemanw merged commit b8d1d8d into civicrm:master Jun 7, 2019
@eileenmcnaughton eileenmcnaughton deleted the from_to_test branch June 7, 2019 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants