Fix failing VersionPress\Tests\Workflow\CloneMergeTest::dateModifiedMergesAutomatically test#1376
Conversation
…ergesAutomatically test
|
@borekb This hopefully helps that release process :) |
| // see commit ff504f77 | ||
| // therefore, the dates won't be exactly the same due to processing time and the sleep(1) above | ||
| $this->assertEquals(new DateTime($clonedModifiedDate), new DateTime($modifiedDate), '', 5); | ||
| $this->assertEquals(new DateTime($clonedModifiedDateGmt), new DateTime($modifiedDateGmt), '', 5); |
There was a problem hiding this comment.
I'm not sure this is correct. The point of the merge driver is to make both dates the same after merge, and the merge happens above on line 130. Here's a snippet from the merge driver:
versionpress/plugins/versionpress/src/Git/merge-drivers/ini-merge.php
Lines 36 to 41 in f5c6c2e
So at this point, $clonedModifiedDate should be equal to $modifiedDate. Is that correct, @JanVoracek?
There was a problem hiding this comment.
It looks like that behavior changed in ff504f7 so the date should be "now" and not whatever it was before
There was a problem hiding this comment.
@borekb: Yes, it is correct, I guess. And notice that test works for me when PHP implementation of merge driver is forced. But test is using Bash implementation by default and there is probably some hidden problem.
Thanks, yes, this is one of the biggest blockers for the release. Thanks for starting the PR. |
|
We think we found a true cause of the failing test – our merge driver doesn't work on certain Linux distros, #1384. The test itself is fine so I'm going to close this. |
post_modified and post_modified_gmt are explicitly set to "now"
see commit ff504f7
therefore, the dates won't be exactly the same due to processing time and the sleep(1) above