Bug #38435

Reset the router for each functional test

Added by Bastian Waidelich 11 months ago. Updated 11 months ago.

Status:Resolved Start date:2012-06-27
Priority:Must have Due date:
Assignee:Bastian Waidelich % Done:

100%

Category:- Testing -
Target version:TYPO3 Flow Base Distribution - 1.1
PHP Version: Complexity:no-brainer
Has patch:No FLOW3 version affected:Git 1.2 (master)
Votes: 0

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

Revision fe1e420c
Added by Bastian Waidelich 11 months ago

[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

Revision 3bb66040
Added by Bastian Waidelich 11 months ago

[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

Revision cff94d79
Added by Bastian Waidelich 11 months ago

[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

Revision 06e21083
Added by Bastian Waidelich 11 months ago

[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

Updated by Gerrit Code Review 11 months 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

Updated by Gerrit Code Review 11 months ago

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

Updated by Gerrit Code Review 11 months ago

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

Updated by Gerrit Code Review 11 months 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

Updated by Gerrit Code Review 11 months ago

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

Updated by Karsten Dambekalns 11 months ago

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

Updated by Bastian Waidelich 11 months 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.

Updated by Gerrit Code Review 11 months 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

Updated by Gerrit Code Review 11 months 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

Updated by Bastian Waidelich 11 months ago

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

Also available in: Atom PDF