[
https://issues.apache.org/jira/browse/RYA-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15602660#comment-15602660
]
ASF GitHub Bot commented on RYA-174:
------------------------------------
Github user amihalik commented on a diff in the pull request:
https://github.com/apache/incubator-rya/pull/118#discussion_r84739883
--- Diff: extras/indexingExample/src/main/java/MongoRyaDirectExample.java
---
@@ -255,19 +265,29 @@ private static void
testAddAndFreeTextSearchWithPCJ(SailRepositoryConnection con
Validate.isTrue(tupleHandler.getCount() == 2);
}
- private static Configuration getConf() {
+ private static MockMongoFactory mock = null;
+ private static Configuration getConf() throws IOException {
MongoDBRdfConfiguration conf = new MongoDBRdfConfiguration();
conf.set(ConfigUtils.USE_MONGO, "true");
- // User name and password must be filled in:
- conf.set(MongoDBRdfConfiguration.MONGO_USER, "fill this in");
- conf.set(MongoDBRdfConfiguration.MONGO_USER_PASSWORD, "fill this
in");
- conf.set(MongoDBRdfConfiguration.USE_TEST_MONGO,
Boolean.toString(USE_MOCK));
- if (!USE_MOCK){
+ if (USE_MOCK) {
+ mock = MockMongoFactory.newFactory();
+ MongoClient c = mock.newMongo();
+ ServerAddress address = c.getAddress();
+ String url = address.getHost();
+ String port = Integer.toString(address.getPort());
+ c.close();
+// conf.set(MongoDBRdfConfiguration.MONGO_USER, "fill this in");
--- End diff --
Done.
> Embedded Mongo tries to bind to busy ports
> ------------------------------------------
>
> Key: RYA-174
> URL: https://issues.apache.org/jira/browse/RYA-174
> Project: Rya
> Issue Type: Bug
> Reporter: Aaron Mihalik
> Assignee: Aaron Mihalik
> Fix For: 3.2.10
>
>
> There are a couple mongo tests that fail while building on builds.a.o. It
> looks like Embedded Mongo will try to bind to ports that are already in use.
> https://builds.apache.org/view/Incubator%20Projects/job/incubator-rya-master/org.apache.rya$rya.indexing/31/testReport/junit/mvm.rya.indexing.mongo/MongoGeoIndexerSfTest/testIntersectsLine/
> https://builds.apache.org/view/Incubator%20Projects/job/incubator-rya-master/org.apache.rya$rya.indexing/31/testReport/junit/mvm.rya.indexing.mongo/MongoTemporalIndexerTest/testQueryInstantHasBeginningInterval/
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)