jenkins-bot has submitted this change and it was merged.
Change subject: Reset the wb_entity_per_page table in
PropertyInfoTableBuilderTest
......................................................................
Reset the wb_entity_per_page table in PropertyInfoTableBuilderTest
Prior to adding our test data.
Bug: 66405
Change-Id: I91efdc6f6218639b8c5d5ea1e191a3062a316b57
---
M repo/includes/store/sql/PropertyInfoTableBuilder.php
M repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
2 files changed, 8 insertions(+), 3 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/includes/store/sql/PropertyInfoTableBuilder.php
b/repo/includes/store/sql/PropertyInfoTableBuilder.php
index bd4e6a7..7badac9 100644
--- a/repo/includes/store/sql/PropertyInfoTableBuilder.php
+++ b/repo/includes/store/sql/PropertyInfoTableBuilder.php
@@ -2,7 +2,6 @@
namespace Wikibase;
-use DatabaseBase;
use MessageReporter;
use Wikibase\DataModel\Entity\PropertyId;
use Wikibase\Lib\Store\EntityLookup;
diff --git
a/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
b/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
index ffbdc76..d29bce8 100644
--- a/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
+++ b/repo/tests/phpunit/includes/store/sql/PropertyInfoTableBuilderTest.php
@@ -8,7 +8,6 @@
use Wikibase\PropertyInfoTable;
use Wikibase\PropertyInfoTableBuilder;
use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Lib\Store\WikiPageEntityLookup;
/**
* @covers Wikibase\PropertyInfoTableBuilder
@@ -51,7 +50,15 @@
return $properties;
}
+ private function resetPropertyInfoTable( PropertyInfoTable $table ) {
+ $dbw = $table->getWriteConnection();
+ $dbw->delete( 'wb_entity_per_page', '*' );
+ }
+
public function testRebuildPropertyInfo() {
+ $table = new PropertyInfoTable( false );
+
+ $this->resetPropertyInfoTable( $table );
$properties = $this->initProperties();
$propertyIds = array_keys( $properties );
@@ -59,7 +66,6 @@
// so we should also use the EntityLookup from
WikibaseRepo.
$entityLookup =
WikibaseRepo::getDefaultInstance()->getEntityLookup();
- $table = new PropertyInfoTable( false );
$builder = new PropertyInfoTableBuilder( $table, $entityLookup
);
$builder->setBatchSize( 3 );
--
To view, visit https://gerrit.wikimedia.org/r/138591
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I91efdc6f6218639b8c5d5ea1e191a3062a316b57
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: WikidataJenkins <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits