Bug #32346

allObjectsPersisted is not triggered after each test

Added by Robert Lemke over 3 years ago. Updated over 3 years ago.

Status:Resolved Start date:2011-12-06
Priority:Must have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:- Testing -
Target version:TYPO3 Flow Base Distribution - 1.1 beta 1
PHP Version:5.3 Complexity:medium
Has patch:No Affected Flow version:Git master

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
Added by Robert Lemke over 3 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
Added by Robert Lemke over 3 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 over 3 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 over 3 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 over 3 years ago

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

#4 Updated by Gerrit Code Review over 3 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 over 3 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 over 3 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 3 years ago

  • Status changed from Under Review to Resolved

#8 Updated by Karsten Dambekalns over 3 years ago

  • Target version changed from 1.1 to 1.1 beta 1

Also available in: Atom PDF