Bug #32346

allObjectsPersisted is not triggered after each test

Added by Robert Lemke almost 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
- Testing -
Start date:
2011-12-06
Due date:
% Done:

100%

PHP Version:
5.3
Has patch:
No
Complexity:
medium

Description

The tearDown() method of the base functional test case clears the persistence manager's state so it is ready for the next test, avoiding side effects.

However, certain repositories (such as the TYPO3CR NodeRepository) rely on the signal "allObjectsPersisted" which triggers their internal cleanup function. If this signal is not, sent, the next test will still see added objects stored directly in the repository.

The solution is to call persistAll() in the tearDown() method, even if the just executed test doesn't require it.

Associated revisions

Revision 46646d81 (diff)
Added by Robert Lemke almost 8 years ago

[BUGFIX] Trigger allObjectsPersisted after every functional test

The tearDown() method of the base functional test case clears the
persistence manager's state so it is ready for the next test, avoiding
side effects.

However, certain repositories (such as the TYPO3CR NodeRepository) rely
on the signal "allObjectsPersisted" which triggers their internal
cleanup function. If this signal is not, sent, the next test will still
see added objects stored directly in the repository.

The solution is to call persistAll() in the tearDown() method, even if
the just executed test doesn't require it.

Change-Id: I81febe963609d7214055331b693a964d92ac1e55
Fixes: #32346
Releases: 1.1, 1.0

Revision 36a893c2 (diff)
Added by Robert Lemke almost 8 years ago

[BUGFIX] Trigger allObjectsPersisted after every functional test

The tearDown() method of the base functional test case clears the
persistence manager's state so it is ready for the next test, avoiding
side effects.

However, certain repositories (such as the TYPO3CR NodeRepository) rely
on the signal "allObjectsPersisted" which triggers their internal
cleanup function. If this signal is not, sent, the next test will still
see added objects stored directly in the repository.

The solution is to call persistAll() in the tearDown() method, even if
the just executed test doesn't require it.

Change-Id: Ib0fe4f2f9cd56bc62fad8fe4fa5ee545fbc15aee
Fixes: #32346
Releases: 1.1, 1.0

History

#1 Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7093

#2 Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7093

#3 Updated by Robert Lemke almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Gerrit Code Review almost 8 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7242

#5 Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7242

#6 Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch FLOW3-1.0 has been pushed to the review server.
It is available at http://review.typo3.org/7242

#7 Updated by Robert Lemke over 7 years ago

  • Status changed from Under Review to Resolved

#8 Updated by Karsten Dambekalns over 7 years ago

  • Target version changed from 1.1 to 1.1 beta 1

Also available in: Atom PDF