Bug #38435
Reset the router for each functional test
Status: | Resolved | Start date: | 2012-06-27 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - Testing - | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 | |||
PHP Version: | Complexity: | no-brainer | ||
Has patch: | No | Affected Flow version: | Git 1.2 (master) |
Description
Currently all functional tests share the same instance of \TYPO3\FLOW3\Mvc\Routing\Router
because the InternalRequestEngine is of scope singleton.
This leads to unexpected results and failing tests if tests add custom routes.
The router instance should be reset for each test case.
Associated revisions
[BUGFIX] Reset the router for each functional test
Currently all functional tests share the same instance of
\TYPO3\FLOW3\Mvc\Routing\Router because the InternalRequestEngine
is of scope singleton.
This leads to unexpected results and failing tests if tests add
custom routes.
This change fixes this by reinitializing the request engine for
each test case that has testableHttpEnabled set to TRUE.
Change-Id: I5a5bf17d00c5be05748a18122dae42989f429221
Fixes: #38435
Releases: 1.1, 1.2
[BUGFIX] Reset the router for each functional test
Currently all functional tests share the same instance of
\TYPO3\FLOW3\Mvc\Routing\Router because the InternalRequestEngine
is of scope singleton.
This leads to unexpected results and failing tests if tests add
custom routes.
This change fixes this by reinitializing the request engine for
each test case that has testableHttpEnabled set to TRUE.
Change-Id: I5a5bf17d00c5be05748a18122dae42989f429221
Fixes: #38435
Releases: 1.1, 1.2
[BUGFIX] Reset InternalRequestEngine for each functional test
Currently all functional tests share the same instance of
\TYPO3\FLOW3\Mvc\Routing\Router because the InternalRequestEngine
is of scope singleton.
This leads to unexpected results and failing tests if tests add
custom routes.
This change fixes this by making the ObjectManager forget the
singleton instance of the request engine after each testrun.
This also reverts the changes that were introduced with
I5a5bf17d00c5be05748a18122dae42989f429221 as they did not
have the expected effect.
Change-Id: Ie0cd7abf0a5b5021681e3db4854628990bec1e4b
Fixes: #38435
Releases: 1.1, 1.2
[BUGFIX] Reset InternalRequestEngine for each functional test
Currently all functional tests share the same instance of
\TYPO3\FLOW3\Mvc\Routing\Router because the InternalRequestEngine
is of scope singleton.
This leads to unexpected results and failing tests if tests add
custom routes.
This change fixes this by making the ObjectManager forget the
singleton instance of the request engine after each testrun.
This also reverts the changes that were introduced with
I5a5bf17d00c5be05748a18122dae42989f429221 as they did not
have the expected effect.
Change-Id: Ie0cd7abf0a5b5021681e3db4854628990bec1e4b
Fixes: #38435
Releases: 1.1, 1.2
History
#1 Updated by Gerrit Code Review about 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/12402
#2 Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12402
#3 Updated by Gerrit Code Review about 3 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12402
#4 Updated by Gerrit Code Review about 3 years ago
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12405
#5 Updated by Gerrit Code Review about 3 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/12402
#6 Updated by Karsten Dambekalns about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
#7 Updated by Bastian Waidelich about 3 years ago
- Status changed from Resolved to Accepted
- % Done changed from 100 to 0
The solution provided with http://review.typo3.org/12402 did not solve the issue. We need to reset the InternalRequestEngine as the router can't be reset for some reason.
#8 Updated by Gerrit Code Review about 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/12661
#9 Updated by Gerrit Code Review about 3 years ago
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/12662
#10 Updated by Bastian Waidelich about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 06e21083c4f806973bcb1176d6ae74bd473a6ffc.