RYA-397 Renamed MockMongoSingleton/Factory to Embedded. Closes #238.

Since they create/use Embedded Mongo, not Mock
renamed to show what they actually use.


Project: http://git-wip-us.apache.org/repos/asf/incubator-rya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rya/commit/26e9214c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rya/tree/26e9214c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rya/diff/26e9214c

Branch: refs/heads/master
Commit: 26e9214ce745bc23f8c1f44af2e4235395069aea
Parents: 244b870
Author: Andrew Smith <smith...@gmail.com>
Authored: Thu Oct 5 14:45:09 2017 -0400
Committer: jdasch <hcs...@gmail.com>
Committed: Thu Oct 12 12:55:04 2017 -0400

----------------------------------------------------------------------
 .../rya/mongodb/EmbeddedMongoFactory.java       | 97 ++++++++++++++++++++
 .../apache/rya/mongodb/MockMongoFactory.java    | 97 --------------------
 .../rya/mongodb/EmbeddedMongoSingleton.java     | 82 +++++++++++++++++
 .../apache/rya/mongodb/MockMongoSingleton.java  | 82 -----------------
 .../apache/rya/mongodb/MongoRyaTestBase.java    |  4 +-
 .../org/apache/rya/mongodb/MongoTestBase.java   |  2 +-
 .../src/main/java/InferenceExamples.java        |  6 +-
 .../src/main/java/MongoRyaDirectExample.java    |  6 +-
 .../geoExamples/RyaMongoGeoDirectExample.java   |  6 +-
 .../indexing/geotemporal/mongo/MongoITBase.java |  4 +-
 .../indexing/mongo/MongoIndexerDeleteIT.java    |  4 +-
 11 files changed, 195 insertions(+), 195 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/EmbeddedMongoFactory.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/EmbeddedMongoFactory.java
 
b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/EmbeddedMongoFactory.java
new file mode 100644
index 0000000..f023739
--- /dev/null
+++ 
b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/EmbeddedMongoFactory.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.mongodb;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.UnknownHostException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mongodb.MongoClient;
+import com.mongodb.MongoException;
+import com.mongodb.ServerAddress;
+
+import de.flapdoodle.embed.mongo.Command;
+import de.flapdoodle.embed.mongo.MongodExecutable;
+import de.flapdoodle.embed.mongo.MongodProcess;
+import de.flapdoodle.embed.mongo.MongodStarter;
+import de.flapdoodle.embed.mongo.config.IMongodConfig;
+import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
+import de.flapdoodle.embed.mongo.config.Net;
+import de.flapdoodle.embed.mongo.config.RuntimeConfigBuilder;
+import de.flapdoodle.embed.mongo.distribution.IFeatureAwareVersion;
+import de.flapdoodle.embed.mongo.distribution.Version;
+
+public class EmbeddedMongoFactory {
+    private static Logger logger = 
LoggerFactory.getLogger(EmbeddedMongoFactory.class.getName());
+
+    public static EmbeddedMongoFactory newFactory() throws IOException {
+        return EmbeddedMongoFactory.with(Version.Main.PRODUCTION);
+    }
+    
+    public static EmbeddedMongoFactory with(final IFeatureAwareVersion 
version) throws IOException {
+        return new EmbeddedMongoFactory(version);
+    }
+
+    private final MongodExecutable mongodExecutable;
+    private final MongodProcess mongodProcess;
+
+    /**
+     * Create the testing utility using the specified version of MongoDB.
+     * 
+     * @param version
+     *            version of MongoDB.
+     */
+    private EmbeddedMongoFactory(final IFeatureAwareVersion version) throws 
IOException {
+        final MongodStarter runtime = MongodStarter.getInstance(new 
RuntimeConfigBuilder().defaultsWithLogger(Command.MongoD, logger).build());
+        mongodExecutable = runtime.prepare(newMongodConfig(version));
+        mongodProcess = mongodExecutable.start();
+    }
+
+    private IMongodConfig newMongodConfig(final IFeatureAwareVersion version) 
throws UnknownHostException, IOException {
+        Net net = new Net(findRandomOpenPortOnAllLocalInterfaces(), false);
+        return new MongodConfigBuilder().version(version).net(net).build();
+    }
+
+    private int findRandomOpenPortOnAllLocalInterfaces() throws IOException {
+        try (ServerSocket socket = new ServerSocket(0);) {
+            return socket.getLocalPort();
+        }
+    }
+
+    /**
+     * Creates a new Mongo connection.
+     * 
+     * @throws MongoException
+     * @throws UnknownHostException
+     */
+    public MongoClient newMongoClient() throws UnknownHostException, 
MongoException {
+        return new MongoClient(new 
ServerAddress(mongodProcess.getConfig().net().getServerAddress(), 
mongodProcess.getConfig().net().getPort()));
+    }
+
+    /**
+     * Cleans up the resources created by the utility.
+     */
+    public void shutdown() {
+        mongodProcess.stop();
+        mongodExecutable.stop();
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MockMongoFactory.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MockMongoFactory.java 
b/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MockMongoFactory.java
deleted file mode 100644
index baafcea..0000000
--- a/dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/MockMongoFactory.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- * 
- *   http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.mongodb;
-
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.net.UnknownHostException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.mongodb.MongoClient;
-import com.mongodb.MongoException;
-import com.mongodb.ServerAddress;
-
-import de.flapdoodle.embed.mongo.Command;
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodProcess;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.IMongodConfig;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.config.RuntimeConfigBuilder;
-import de.flapdoodle.embed.mongo.distribution.IFeatureAwareVersion;
-import de.flapdoodle.embed.mongo.distribution.Version;
-
-public class MockMongoFactory {
-    private static Logger logger = 
LoggerFactory.getLogger(MockMongoFactory.class.getName());
-
-    public static MockMongoFactory newFactory() throws IOException {
-        return MockMongoFactory.with(Version.Main.PRODUCTION);
-    }
-    
-    public static MockMongoFactory with(final IFeatureAwareVersion version) 
throws IOException {
-        return new MockMongoFactory(version);
-    }
-
-    private final MongodExecutable mongodExecutable;
-    private final MongodProcess mongodProcess;
-
-    /**
-     * Create the testing utility using the specified version of MongoDB.
-     * 
-     * @param version
-     *            version of MongoDB.
-     */
-    private MockMongoFactory(final IFeatureAwareVersion version) throws 
IOException {
-        final MongodStarter runtime = MongodStarter.getInstance(new 
RuntimeConfigBuilder().defaultsWithLogger(Command.MongoD, logger).build());
-        mongodExecutable = runtime.prepare(newMongodConfig(version));
-        mongodProcess = mongodExecutable.start();
-    }
-
-    private IMongodConfig newMongodConfig(final IFeatureAwareVersion version) 
throws UnknownHostException, IOException {
-        Net net = new Net(findRandomOpenPortOnAllLocalInterfaces(), false);
-        return new MongodConfigBuilder().version(version).net(net).build();
-    }
-
-    private int findRandomOpenPortOnAllLocalInterfaces() throws IOException {
-        try (ServerSocket socket = new ServerSocket(0);) {
-            return socket.getLocalPort();
-        }
-    }
-
-    /**
-     * Creates a new Mongo connection.
-     * 
-     * @throws MongoException
-     * @throws UnknownHostException
-     */
-    public MongoClient newMongoClient() throws UnknownHostException, 
MongoException {
-        return new MongoClient(new 
ServerAddress(mongodProcess.getConfig().net().getServerAddress(), 
mongodProcess.getConfig().net().getPort()));
-    }
-
-    /**
-     * Cleans up the resources created by the utility.
-     */
-    public void shutdown() {
-        mongodProcess.stop();
-        mongodExecutable.stop();
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/EmbeddedMongoSingleton.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/EmbeddedMongoSingleton.java
 
b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/EmbeddedMongoSingleton.java
new file mode 100644
index 0000000..e068405
--- /dev/null
+++ 
b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/EmbeddedMongoSingleton.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.rya.mongodb;
+
+import java.io.IOException;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mongodb.MongoClient;
+
+/**
+ * To be used for tests. Creates a singleton {@link MongoClient} to be used
+ * throughout all of the MongoDB related tests. Without the singleton, the
+ * embedded mongo factory ends up orphaning processes, consuming resources.
+ */
+public class EmbeddedMongoSingleton {
+    public static MongoClient getInstance() {
+        return InstanceHolder.SINGLETON.instance;
+    }
+
+    private EmbeddedMongoSingleton() {
+        // hiding implicit default constructor
+    }
+
+    private enum InstanceHolder {
+
+        SINGLETON;
+
+        private final Logger log;
+        private MongoClient instance;
+
+        InstanceHolder() {
+            log = LoggerFactory.getLogger(EmbeddedMongoSingleton.class);
+            instance = null;
+            try {
+                instance = EmbeddedMongoFactory.newFactory().newMongoClient();
+                // JUnit does not have an overall lifecycle event for tearing 
down
+                // this kind of resource, but shutdown hooks work alright in 
practice
+                // since this should only be used during testing
+
+                // The only other alternative for lifecycle management is to 
use a
+                // suite lifecycle to enclose the tests that need this 
resource.
+                // In practice this becomes unwieldy.
+                Runtime.getRuntime().addShutdownHook(new Thread() {
+                    @Override
+                    public void run() {
+                        try {
+                            instance.close();
+                        } catch (final Throwable t) {
+                            // logging frameworks will likely be shut down
+                            t.printStackTrace(System.err);
+                        }
+                    }
+                });
+
+            } catch (final IOException e) {
+                log.error("Unexpected error while starting mongo client", e);
+            } catch (final Throwable e) {
+                // catching throwable because failure to construct an enum
+                // instance will lead to another error being thrown downstream
+                log.error("Unexpected throwable while starting mongo client", 
e);
+            }
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MockMongoSingleton.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MockMongoSingleton.java 
b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MockMongoSingleton.java
deleted file mode 100644
index c7860af..0000000
--- 
a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MockMongoSingleton.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.rya.mongodb;
-
-import java.io.IOException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.mongodb.MongoClient;
-
-/**
- * To be used for tests. Creates a singleton {@link MongoClient} to be used
- * throughout all of the MongoDB related tests. Without the singleton, the
- * embedded mongo factory ends up orphaning processes, consuming resources.
- */
-public class MockMongoSingleton {
-    public static MongoClient getInstance() {
-        return InstanceHolder.SINGLETON.instance;
-    }
-
-    private MockMongoSingleton() {
-        // hiding implicit default constructor
-    }
-
-    private enum InstanceHolder {
-
-        SINGLETON;
-
-        private final Logger log;
-        private MongoClient instance;
-
-        InstanceHolder() {
-            log = LoggerFactory.getLogger(MockMongoSingleton.class);
-            instance = null;
-            try {
-                instance = MockMongoFactory.newFactory().newMongoClient();
-                // JUnit does not have an overall lifecycle event for tearing 
down
-                // this kind of resource, but shutdown hooks work alright in 
practice
-                // since this should only be used during testing
-
-                // The only other alternative for lifecycle management is to 
use a
-                // suite lifecycle to enclose the tests that need this 
resource.
-                // In practice this becomes unwieldy.
-                Runtime.getRuntime().addShutdownHook(new Thread() {
-                    @Override
-                    public void run() {
-                        try {
-                            instance.close();
-                        } catch (final Throwable t) {
-                            // logging frameworks will likely be shut down
-                            t.printStackTrace(System.err);
-                        }
-                    }
-                });
-
-            } catch (final IOException e) {
-                log.error("Unexpected error while starting mongo client", e);
-            } catch (final Throwable e) {
-                // catching throwable because failure to construct an enum
-                // instance will lead to another error being thrown downstream
-                log.error("Unexpected throwable while starting mongo client", 
e);
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoRyaTestBase.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoRyaTestBase.java 
b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoRyaTestBase.java
index b0a4161..3d95818 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoRyaTestBase.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoRyaTestBase.java
@@ -35,13 +35,13 @@ public class MongoRyaTestBase {
 
     private static final AtomicInteger db = new AtomicInteger(1);
 
-    protected static MockMongoFactory testsFactory;
+    protected static EmbeddedMongoFactory testsFactory;
     protected MongoClient mongoClient;
     private int currentTestDb = -1;
 
     @BeforeClass()
     public static void beforeClass() throws Exception {
-        testsFactory = MockMongoFactory.with(Version.Main.PRODUCTION);
+        testsFactory = EmbeddedMongoFactory.with(Version.Main.PRODUCTION);
     }
 
     @Before

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoTestBase.java
----------------------------------------------------------------------
diff --git 
a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoTestBase.java 
b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoTestBase.java
index e4578f2..ffd4fd9 100644
--- a/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoTestBase.java
+++ b/dao/mongodb.rya/src/test/java/org/apache/rya/mongodb/MongoTestBase.java
@@ -39,7 +39,7 @@ public class MongoTestBase {
         conf.setBoolean("sc.useMongo", true);
         conf.setTablePrefix("test_");
         conf.setMongoDBName("testDB");
-        mongoClient = MockMongoSingleton.getInstance();
+        mongoClient = EmbeddedMongoSingleton.getInstance();
         conf.setMongoClient(mongoClient);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/extras/indexingExample/src/main/java/InferenceExamples.java
----------------------------------------------------------------------
diff --git a/extras/indexingExample/src/main/java/InferenceExamples.java 
b/extras/indexingExample/src/main/java/InferenceExamples.java
index 474d7b0..d1d9dc4 100644
--- a/extras/indexingExample/src/main/java/InferenceExamples.java
+++ b/extras/indexingExample/src/main/java/InferenceExamples.java
@@ -30,7 +30,7 @@ import org.apache.log4j.PatternLayout;
 import org.apache.rya.indexing.accumulo.ConfigUtils;
 import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
 import 
org.apache.rya.indexing.mongodb.MongoIndexingConfiguration.MongoDBIndexingConfigBuilder;
-import org.apache.rya.mongodb.MockMongoFactory;
+import org.apache.rya.mongodb.EmbeddedMongoFactory;
 import org.apache.rya.mongodb.MongoConnectorFactory;
 import org.apache.rya.rdftriplestore.RdfCloudTripleStore;
 import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
@@ -88,7 +88,7 @@ public class InferenceExamples {
                rootLogger.setLevel(Level.INFO);
                // Filter out noisy messages from the following classes.
                Logger.getLogger(ClientCnxn.class).setLevel(Level.OFF);
-               Logger.getLogger(MockMongoFactory.class).setLevel(Level.OFF);
+               
Logger.getLogger(EmbeddedMongoFactory.class).setLevel(Level.OFF);
            }
 
            public static void main(final String[] args) throws Exception {
@@ -154,7 +154,7 @@ public class InferenceExamples {
                            
.setUseMockMongo(USE_EMBEDDED_MONGO).setUseInference(true).setAuths("U");
                
                if (USE_EMBEDDED_MONGO) {
-                   final MongoClient c = 
MockMongoFactory.newFactory().newMongoClient();
+                   final MongoClient c = 
EmbeddedMongoFactory.newFactory().newMongoClient();
                    final ServerAddress address = c.getAddress();
                    final String url = address.getHost();
                    final String port = Integer.toString(address.getPort());

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/extras/indexingExample/src/main/java/MongoRyaDirectExample.java
----------------------------------------------------------------------
diff --git a/extras/indexingExample/src/main/java/MongoRyaDirectExample.java 
b/extras/indexingExample/src/main/java/MongoRyaDirectExample.java
index 4883427..f8927d4 100644
--- a/extras/indexingExample/src/main/java/MongoRyaDirectExample.java
+++ b/extras/indexingExample/src/main/java/MongoRyaDirectExample.java
@@ -30,7 +30,7 @@ import org.apache.log4j.PatternLayout;
 import org.apache.rya.indexing.accumulo.ConfigUtils;
 import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
 import 
org.apache.rya.indexing.mongodb.MongoIndexingConfiguration.MongoDBIndexingConfigBuilder;
-import org.apache.rya.mongodb.MockMongoFactory;
+import org.apache.rya.mongodb.EmbeddedMongoFactory;
 import org.apache.rya.mongodb.MongoConnectorFactory;
 import org.apache.rya.rdftriplestore.RdfCloudTripleStore;
 import org.apache.rya.rdftriplestore.inference.InferenceEngineException;
@@ -91,7 +91,7 @@ public class MongoRyaDirectExample {
         rootLogger.setLevel(Level.INFO);
         // Filter out noisy messages from the following classes.
         Logger.getLogger(ClientCnxn.class).setLevel(Level.OFF);
-        Logger.getLogger(MockMongoFactory.class).setLevel(Level.OFF);
+        Logger.getLogger(EmbeddedMongoFactory.class).setLevel(Level.OFF);
     }
 
     public static void main(final String[] args) throws Exception {
@@ -297,7 +297,7 @@ public class MongoRyaDirectExample {
             
.setUseMockMongo(USE_MOCK).setUseInference(USE_INFER).setAuths("U");
 
         if (USE_MOCK) {
-            final MongoClient c = 
MockMongoFactory.newFactory().newMongoClient();
+            final MongoClient c = 
EmbeddedMongoFactory.newFactory().newMongoClient();
             final ServerAddress address = c.getAddress();
             final String url = address.getHost();
             final String port = Integer.toString(address.getPort());

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java
----------------------------------------------------------------------
diff --git 
a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java
 
b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java
index e42ce07..ede3f98 100644
--- 
a/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java
+++ 
b/extras/rya.geoindexing/geo.mongo/src/main/java/org/apache/rya/indexing/geoExamples/RyaMongoGeoDirectExample.java
@@ -29,7 +29,7 @@ import org.apache.rya.indexing.accumulo.ConfigUtils;
 import org.apache.rya.indexing.accumulo.geo.OptionalConfigUtils;
 import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
 import 
org.apache.rya.indexing.mongodb.MongoIndexingConfiguration.MongoDBIndexingConfigBuilder;
-import org.apache.rya.mongodb.MockMongoFactory;
+import org.apache.rya.mongodb.EmbeddedMongoFactory;
 import org.apache.rya.mongodb.MongoConnectorFactory;
 import org.openrdf.model.vocabulary.RDFS;
 import org.openrdf.query.BindingSet;
@@ -172,14 +172,14 @@ public class RyaMongoGeoDirectExample {
         }
     }
 
-    private static MockMongoFactory mock = null;
+    private static EmbeddedMongoFactory mock = null;
     private static Configuration getConf() throws IOException {
 
        MongoDBIndexingConfigBuilder builder = 
MongoIndexingConfiguration.builder()
                
.setUseMockMongo(USE_MOCK).setUseInference(USE_INFER).setAuths("U");
 
         if (USE_MOCK) {
-            mock = MockMongoFactory.newFactory();
+            mock = EmbeddedMongoFactory.newFactory();
             MongoClient c = mock.newMongoClient();
             ServerAddress address = c.getAddress();
             String url = address.getHost();

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoITBase.java
----------------------------------------------------------------------
diff --git 
a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoITBase.java
 
b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoITBase.java
index 7488572..2ca2780 100644
--- 
a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoITBase.java
+++ 
b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/geotemporal/mongo/MongoITBase.java
@@ -21,7 +21,7 @@ package org.apache.rya.indexing.geotemporal.mongo;
 import org.apache.rya.indexing.accumulo.ConfigUtils;
 import org.apache.rya.indexing.geotemporal.GeoTemporalTestBase;
 import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
-import org.apache.rya.mongodb.MockMongoSingleton;
+import org.apache.rya.mongodb.EmbeddedMongoSingleton;
 import org.junit.After;
 import org.junit.Before;
 
@@ -38,7 +38,7 @@ public class MongoITBase extends GeoTemporalTestBase {
 
     @Before
     public void setupTest() throws Exception {
-        mongoClient = MockMongoSingleton.getInstance();
+        mongoClient = EmbeddedMongoSingleton.getInstance();
         conf = MongoIndexingConfiguration.builder()
             .setMongoCollectionPrefix("test_")
             .setMongoDBName("testDB")

http://git-wip-us.apache.org/repos/asf/incubator-rya/blob/26e9214c/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoIndexerDeleteIT.java
----------------------------------------------------------------------
diff --git 
a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoIndexerDeleteIT.java
 
b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoIndexerDeleteIT.java
index 65f37c3..5751887 100644
--- 
a/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoIndexerDeleteIT.java
+++ 
b/extras/rya.geoindexing/geo.mongo/src/test/java/org/apache/rya/indexing/mongo/MongoIndexerDeleteIT.java
@@ -30,7 +30,7 @@ import org.apache.rya.indexing.TemporalInstantRfc3339;
 import org.apache.rya.indexing.accumulo.ConfigUtils;
 import org.apache.rya.indexing.accumulo.geo.OptionalConfigUtils;
 import org.apache.rya.indexing.mongodb.MongoIndexingConfiguration;
-import org.apache.rya.mongodb.MockMongoSingleton;
+import org.apache.rya.mongodb.EmbeddedMongoSingleton;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -70,7 +70,7 @@ public class MongoIndexerDeleteIT {
             .setMongoTemporalPredicates("Property:atTime")
             .build();
 
-        client = MockMongoSingleton.getInstance();
+        client = EmbeddedMongoSingleton.getInstance();
         indxrConf.setBoolean(OptionalConfigUtils.USE_GEO, true);
         indxrConf.set(ConfigUtils.GEO_PREDICATES_LIST, 
"http://www.opengis.net/ont/geosparql#asWKT";);
         indxrConf.setBoolean(ConfigUtils.USE_MONGO, true);

Reply via email to