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

Cleanup tests #33428

Merged
merged 1 commit into from Sep 2, 2019

Conversation

@nicolas-grekas
Copy link
Member

commented Sep 2, 2019

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

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Sep 2, 2019

$dir = $rootDir = \dirname($r->getFileName());
if (!file_exists($dir = $r->getFileName())) {
throw new \LogicException(sprintf('Cannot auto-detect project dir for kernel of class "%s".', $r->name));

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 2, 2019

Author Member

this missing check made us write bad test cases, fixed below

@@ -980,10 +980,11 @@ protected function getKernel(array $methods = [], array $bundles = [])
protected function getKernelForTest(array $methods = [], $debug = false)

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 2, 2019

Author Member

this method is only used by legacy tests and should be removed when merging up

@@ -30,6 +30,9 @@ trait BlockingStoreTestTrait
*
* This test is time sensible: the $clockDelay could be adjust.
*
* It also fails when run with the global ./phpunit test suite.
* @group transient

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 2, 2019

Author Member

/cc @jderusse FYI

This comment has been minimized.

Copy link
@jderusse

jderusse Sep 2, 2019

Contributor

last time we had random failure, Cache component emptied the Memcached server wich removes locks and failed the test. Are you sure we don't have conflict with other component here?

/**
* @dataProvider booleanProvider
*/
public function testNeedsNormalizationChainNormalizationAware($bool)

This comment has been minimized.

Copy link
@nicolas-grekas

nicolas-grekas Sep 2, 2019

Author Member

This case relies on ChainNormalizationAwareEncoder, which extends ChainEncoder, but the class is @final so cannot be extended. A fix on phpunit-bridge is coming on branch 4.4 to trigger the missing deprecation.

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:test-clean branch 2 times, most recently from 431ac15 to 07eab94 Sep 2, 2019

@nicolas-grekas nicolas-grekas force-pushed the nicolas-grekas:test-clean branch from 07eab94 to a461943 Sep 2, 2019

nicolas-grekas added a commit that referenced this pull request Sep 2, 2019
minor #33428 Cleanup tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Cleanup tests

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

Commits
-------

a461943 Cleanup tests

@nicolas-grekas nicolas-grekas merged commit a461943 into symfony:3.4 Sep 2, 2019

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
fabbot.io Your code looks good.
Details

@nicolas-grekas nicolas-grekas deleted the nicolas-grekas:test-clean branch Sep 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.