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

Add SeekableEntityIdPager #214

Merged
merged 1 commit into from
Apr 16, 2019
Merged

Add SeekableEntityIdPager #214

merged 1 commit into from
Apr 16, 2019

Conversation

JeroenDeDauw
Copy link
Contributor

@JeroenDeDauw JeroenDeDauw commented Apr 16, 2019

Part of https://phabricator.wikimedia.org/T219894
(though the ticket wont tell you anything about this commit)

In Wikibase Repo we have SqlEntityIdPager, which gets used by the
term rebuilding script. In the new term rebuilding script we need
the same stuff. To test that we need to inject a test double.
There is MockEntityIdPager, though it just implements EntityIdPager,
while our implementation needs extra methods from SqlEntityIdPager
that are not in the interface.

These extra methods are added in SeekableEntityIdPager.
InMemoryEntityIdPager is provided as test double and is a modified
version of MockEntityIdPager, which is now also tested.

Part of https://phabricator.wikimedia.org/T219894
(though the ticket wont tell you anything about this commit)

In Wikibase Repo we have SqlEntityIdPager, which gets used by the
term rebuilding script. In the new term rebuilding script we need
the same stuff. To test that we need to inject a test double.
There is MockEntityIdPager, though it just implements EntityIdPager,
while our implementation needs extra methods from SqlEntityIdPager
that are not in the interface.

These extra methods are added in SeekableEntityIdPager.
InMemoryEntityIdPager is provided as test double and is a modified
version of MockEntityIdPager, which is now also tested.

The old term rebuilding code was not tested at all, which is why
we run into this missing interface now.
@AlaaSarhan AlaaSarhan merged commit 2842d65 into master Apr 16, 2019
@JeroenDeDauw JeroenDeDauw deleted the SeekableEntityIdPager branch April 16, 2019 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants