-
-
Notifications
You must be signed in to change notification settings - Fork 824
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] Port some recent test fixes from master to 5.28 #18053
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The strtotime calculation adds 4 months before setting the day of month. However July 31 + 4 months is 1 Dec - ie the month is 12 not 11 due to there being only 30 days. So to get 27 Nov we need to get the July month (7) and add 4 and voila 11, not 12
BY ensuring join_date is in the past we get away from situations where there is no valid status
(Standard links)
|
sure |
Overview -------- In recent days, api_v3_WebsiteTest has emitted sporadic failures like this: ``` api_v3_WebsiteTest::testDeleteWebsite with data set #0 (3) Failed asserting that 3 matches expected 0. /home/jenkins/bknix-max/build/build-2/web/sites/all/modules/civicrm/tests/phpunit/api/v3/WebsiteTest.php:75 /home/jenkins/bknix-max/build/build-2/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:209 /home/jenkins/bknix-max/extern/phpunit7/phpunit7.phar:615 ``` and ``` api_v3_WebsiteTest::testDeleteWebsiteInvalid with data set #0 (3) Failed asserting that 4 matches expected 1. /home/jenkins/bknix-max/build/build-2/web/sites/all/modules/civicrm/tests/phpunit/api/v3/WebsiteTest.php:88 /home/jenkins/bknix-max/build/build-2/web/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:209 /home/jenkins/bknix-max/extern/phpunit7/phpunit7.phar:615 ``` These failures do not reproduce for me in isolation. Before ------ Both the failing assertions make an implicit assumption that the baseline content of `civicrm_website` is empty. After ----- The failing assertions use an explicit baseline (`$beforeCount`). Comments -------- The test failures are sporadic and only seem to seem occur when run in the full suite. My theory is that something else is leaking `civicrm_website` records; however, it's hard to track that down amidst a full suite (when the full suite takes so long to execute). Therefore, I cannot be certain that this is actually fixes the problem. However, this really just tightens up the assumptions of the test - as long as it passes the PR tests, it should be safe to merge and then watch in the `CiviCRM-Core-Matrix`.
Test fails unrelated |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ping @eileenmcnaughton