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

[FrameworkBundle] WebTestCase createClient doesn't check if static:kernel was already allocated #3704

Merged

Conversation

liuggio
Copy link
Contributor

@liuggio liuggio commented Mar 27, 2012

with this little fix CreateClient shuts down the kernel before booting again.

If you add an echo after the "if" on the line number 38
and run the test you would see that sometime the kernel is not properly umounted.

Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]

@@ -160,6 +164,7 @@ protected function tearDown()
{
if (null !== static::$kernel) {
static::$kernel->shutdown();
static::$kernel = null;
Copy link
Member

Choose a reason for hiding this comment

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

This should be removed. We reuse the same kernel for all requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@fabpot
Copy link
Member

fabpot commented Mar 29, 2012

Can you squash your commits before I merge? Thanks.

@liuggio
Copy link
Contributor Author

liuggio commented Mar 29, 2012

Done.

fabpot added a commit that referenced this pull request Mar 29, 2012
…3704)

Commits
-------

3303155 added kernel shutdown before create client, fixed and stashed

Discussion
----------

[FrameworkBundle] WebTestCase createClient doesn't check if static:kernel was already allocated

with this little fix CreateClient shuts down the kernel before booting again.

If you add an echo after the "if" on the line number 38
and run the test you would see that sometime the kernel is not properly umounted.

Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Symfony2 tests pass: [yes]

---------------------------------------------------------------------------

by fabpot at 2012-03-29T09:19:07Z

Can you squash your commits before I merge? Thanks.

---------------------------------------------------------------------------

by liuggio at 2012-03-29T10:17:59Z

Done.
@fabpot fabpot merged commit 3303155 into symfony:master Mar 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants