jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/373725 )
Change subject: allow unit tests to override store props
......................................................................
allow unit tests to override store props
Change-Id: I21219c91bf475b6721a5254f79f91c23b1c7992c
---
M
blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/AbstractRandomizedBlazegraphStorageTestCase.java
1 file changed, 14 insertions(+), 3 deletions(-)
Approvals:
Smalyshev: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/AbstractRandomizedBlazegraphStorageTestCase.java
b/blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/AbstractRandomizedBlazegraphStorageTestCase.java
index 230d7f4..4e45155 100644
---
a/blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/AbstractRandomizedBlazegraphStorageTestCase.java
+++
b/blazegraph/src/test/java/org/wikidata/query/rdf/blazegraph/AbstractRandomizedBlazegraphStorageTestCase.java
@@ -75,7 +75,18 @@
if (store != null) {
return store;
}
- Properties properties = new Properties();
+ Properties properties = initStoreProperties(new Properties());
+ store = new TempTripleStore(temporaryStore(), properties, null);
+ return store;
+ }
+
+ /**
+ * Initialize store properties.
+ * Allows property override by either updating properties object, or
returning a new one.
+ * @param properties Properties that have been set so far
+ * @return Properties object after updating it
+ */
+ protected Properties initStoreProperties(Properties properties) {
properties.setProperty("com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass",
WikibaseVocabulary.VOCABULARY_CLASS.getName());
properties.setProperty("com.bigdata.rdf.store.AbstractTripleStore.inlineURIFactory",
@@ -94,8 +105,8 @@
+ "{ \"valueType\": \"DOUBLE\", \"multiplier\":
\"1000000000\", \"serviceMapping\": \"LATITUDE\" }, "
+ "{ \"valueType\": \"LONG\",
\"multiplier\":\"1\",\"minValue\":\"0\", \"serviceMapping\": \"COORD_SYSTEM\" }
"
+ "]}}");
- store = new TempTripleStore(temporaryStore(), properties, null);
- return store;
+
+ return properties;
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/373725
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I21219c91bf475b6721a5254f79f91c23b1c7992c
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Yurik <[email protected]>
Gerrit-Reviewer: Smalyshev <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits