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

Test tearDown fixes #21548

Merged
merged 1 commit into from
Sep 20, 2021
Merged

Test tearDown fixes #21548

merged 1 commit into from
Sep 20, 2021

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Test tearDown fixes

Before

Can't figure out what is leaving 'civicrm_file' & 'civicrm_entity_file' records behind

After

Have tracked down some ...

Technical Details

Fixes places where parent:tearDown not called and civicrm_file &
civicrm_entity_file not truncated

Also note - increasing use of fail() rather than allowing
exceptions to bubble up in test functions in order
to not let tearDown be such a distraction & require annotation

Comments

@civibot
Copy link

civibot bot commented Sep 20, 2021

(Standard links)

@civibot civibot bot added the master label Sep 20, 2021
@@ -35,10 +40,6 @@ public function testStoreCountry() {
];

CRM_Core_BAO_CustomValueTable::store($params, 'civicrm_contact', $contactID);

$this->customFieldDelete($customField['id']);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moved to tearDown which is more correct

Fixes places where parent:tearDown not called and civicrm_file &
civicrm_entity_file not truncated

Also note - increasing use of fail() rather than allowing
exceptions to bubble up in test functions in order
to not let tearDown be such a distraction & require annotation
@seamuslee001
Copy link
Contributor

well this seems to work @eileenmcnaughton is this mergable now?

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 yeah - then I'll retry the other

@seamuslee001 seamuslee001 merged commit c6fdb63 into civicrm:master Sep 20, 2021
@seamuslee001 seamuslee001 deleted the cleanup branch September 20, 2021 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants