Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove failing test to fix #15935 #15943

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

Merged
merged 1 commit into from
Sep 28, 2015
Merged

Remove failing test to fix #15935 #15943

merged 1 commit into from
Sep 28, 2015

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Sep 27, 2015

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #15935
License MIT
Doc PR

Test has been removed on 2.8 already in https://github.com/symfony/symfony/pull/15738/files#diff-990df0e8238847f8ae54e8227f295c22L107

@aitboudad
Copy link
Contributor

👍

@mpdude
Copy link
Contributor Author

mpdude commented Sep 27, 2015

@stof FYI

@xabbuh
Copy link
Member

xabbuh commented Sep 28, 2015

Doesn't the failing test mean that a feature that worked before will break now? Sorry for the question but I am actually not sure what we are testing here at all.

@mpdude
Copy link
Contributor Author

mpdude commented Sep 28, 2015

@xabbuh If it is a useful and well designed test, yes.

In this particular case, the test loads translations from a fixture in prod mode. It then repeats this to make sure the cached information is used (all green so far).

Then, in a third step, it re-creates the Translator without adding the resource and switches to debug mode; it then expects the cache to be invalid.

The problems with this are as follows:

  • When using different resource sets, the Translator should internally make sure it uses different cache files. This is not the case.
  • Switching from prod to debug probably considered the cache stale before Implement service-based Resource (cache) validation #15738, because in prod the .meta file was not created. This is, however, an implementation detail not relevant for the working of ConfigCache. So, I'd say that this behaviour has even been fixed now because the resource used (the translation fixture file) is unchanged, to it is right to still consider the cache fresh.

Of course you may ask whether we shouldn't fix the test instead of removing it, but honestly I don't even understand what it actually tries to test for (that hasn't been covered elsewhere already).

@fabpot
Copy link
Member

fabpot commented Sep 28, 2015

Thank you @mpdude.

@fabpot fabpot merged commit 5392a0c into symfony:2.7 Sep 28, 2015
fabpot added a commit that referenced this pull request Sep 28, 2015
This PR was merged into the 2.7 branch.

Discussion
----------

Remove failing test to fix #15935

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15935
| License       | MIT
| Doc PR        |

Test has been removed on 2.8 already in https://github.com/symfony/symfony/pull/15738/files#diff-990df0e8238847f8ae54e8227f295c22L107

Commits
-------

5392a0c Remove failing test
@xabbuh
Copy link
Member

xabbuh commented Sep 28, 2015

@mpdude Thank you for your detailed explanation. This makes the reasoning for removing the tests more clear.

@mpdude mpdude deleted the fix-15935 branch September 28, 2015 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants