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

Make sure tests from #7837 are actually run #10433

Merged
merged 1 commit into from Jan 21, 2023

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Jan 19, 2023

I noticed that when I remove this line

https://github.com/Ocramius/doctrine2/blob/98e557b68eeecd7f266f1e4628007aed2714026c/lib/Doctrine/ORM/Tools/Pagination/Paginator.php#L169

added in #7837 the corresponding tests still pass.

This is because the relevant branch in \Doctrine\ORM\Tools\Pagination\Paginator::getIterator() is not reached. A new necessary condition was added briefly afterwards in #7863, and that caused the tests to miss the relevant section.

With the change suggested here, removing the line will make the specific test fail again.

@mpdude mpdude changed the title Make sure tests from 7820 are actually run Make sure tests from #7820 are actually run Jan 19, 2023
@mpdude mpdude changed the title Make sure tests from #7820 are actually run Make sure tests from #7820/#7837 are actually run Jan 19, 2023
@mpdude mpdude changed the title Make sure tests from #7820/#7837 are actually run Make sure tests from #7837 are actually run Jan 19, 2023
@greg0ire
Copy link
Member

🤔 codecov says the Coverage is not affected

@mpdude
Copy link
Contributor Author

mpdude commented Jan 19, 2023

For a start, can you confirm my findings?

What exactly does codecov measure?

@mpdude
Copy link
Contributor Author

mpdude commented Jan 19, 2023

I think this comment anticipated what actually happened, we’re testing the walker thing but did not add the limit.

#7863 (comment)

@mpdude
Copy link
Contributor Author

mpdude commented Jan 19, 2023

#9519 already fixed this problem for another test, but missed the one I found

@mpdude
Copy link
Contributor Author

mpdude commented Jan 19, 2023

Reviewed all other tests that deal with the Paginator and they seem fine.

Copy link
Member

@greg0ire greg0ire left a comment

Choose a reason for hiding this comment

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

The lines are executed in other tests, but removing the line with expireQueryCache does indeed not make the test in GH7820 fail prior to this PR.

@greg0ire greg0ire added this to the 2.14.2 milestone Jan 21, 2023
@greg0ire greg0ire merged commit 1753d03 into doctrine:2.14.x Jan 21, 2023
@greg0ire
Copy link
Member

Thanks @mpdude !

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.

None yet

3 participants