Removed Mongo ES tests based on embedded mongo
Docker based ones are enough
POLYGENE-270
diff --git a/dependencies.gradle b/dependencies.gradle
index f9bc3de..b6446ad 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -183,7 +183,6 @@
def dnsJavaVersion = '2.1.8'
def dockerJUnitVersion = '0.3'
def easyMockVersion = '3.4'
-def embedMongoVersion = '2.0.0' // 2.0.0 exists
def h2Version = '1.4.196'
def hamcrestVersion = '1.3'
def jaxRsApiVersion = '2.0.1'
@@ -200,7 +199,6 @@
dnsjava : "dnsjava:dnsjava:$dnsJavaVersion",
docker_junit : "com.github.tdomzal:junit-docker-rule:$dockerJUnitVersion",
easymock : "org.easymock:easymock:$easyMockVersion",
- embed_mongo : "de.flapdoodle.embed:de.flapdoodle.embed.mongo:$embedMongoVersion",
h2 : "com.h2database:h2:$h2Version",
hamcrest : [ "org.hamcrest:hamcrest-core:$hamcrestVersion",
"org.hamcrest:hamcrest-library:$hamcrestVersion" ],
diff --git a/extensions/entitystore-mongodb/build.gradle b/extensions/entitystore-mongodb/build.gradle
index 940db5a..1d5a0ba 100644
--- a/extensions/entitystore-mongodb/build.gradle
+++ b/extensions/entitystore-mongodb/build.gradle
@@ -33,7 +33,6 @@
runtimeOnly polygene.core.runtime
testImplementation polygene.internals.testsupport
- testImplementation libraries.embed_mongo
testRuntimeOnly libraries.logback
}
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
deleted file mode 100644
index c362490..0000000
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTest.java
+++ /dev/null
@@ -1,88 +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.polygene.entitystore.mongodb;
-
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
-import java.io.IOException;
-import java.util.Collections;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.AssemblyException;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
-import org.apache.polygene.test.EntityTestAssembler;
-import org.apache.polygene.test.entity.AbstractEntityStoreTest;
-import org.apache.polygene.test.util.FreePortFinder;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-public class EmbedMongoDBMapEntityStoreTest extends AbstractEntityStoreTest
-{
- private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
-
- @Rule
- public TestName testName = new TestName();
- private static int port;
- private static MongodExecutable mongod;
-
- @BeforeClass
- public static void startEmbedMongo()
- throws IOException
- {
- port = FreePortFinder.findFreePortOnLoopback();
- mongod = MONGO_STARTER.prepare( new MongodConfigBuilder()
- .version( Version.Main.PRODUCTION )
- .net( new Net( "localhost", port, Network.localhostIsIPv6() ) )
- .build() );
- mongod.start();
- }
-
- @AfterClass
- public static void stopEmbedMongo()
- {
- if( mongod != null )
- {
- mongod.stop();
- }
- }
-
- @Override
- public void assemble( ModuleAssembly module )
- throws AssemblyException
- {
- super.assemble( module );
-
- ModuleAssembly config = module.layer().module( "config" );
- new EntityTestAssembler().defaultServicesVisibleIn( Visibility.layer ).assemble( config );
-
- new MongoDBEntityStoreAssembler().withConfig( config, Visibility.layer ).assemble( module );
-
- MongoDBEntityStoreConfiguration mongoConfig = config.forMixin( MongoDBEntityStoreConfiguration.class )
- .declareDefaults();
- mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
- mongoConfig.database().set( "polygene-test" );
- mongoConfig.collection().set( testName.getMethodName() );
- mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
- }
-}
diff --git a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java b/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
deleted file mode 100644
index 57c1e16..0000000
--- a/extensions/entitystore-mongodb/src/test/java/org/apache/polygene/entitystore/mongodb/EmbedMongoDBMapEntityStoreTestSuite.java
+++ /dev/null
@@ -1,84 +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.polygene.entitystore.mongodb;
-
-import de.flapdoodle.embed.mongo.MongodExecutable;
-import de.flapdoodle.embed.mongo.MongodStarter;
-import de.flapdoodle.embed.mongo.config.MongodConfigBuilder;
-import de.flapdoodle.embed.mongo.config.Net;
-import de.flapdoodle.embed.mongo.distribution.Version;
-import de.flapdoodle.embed.process.runtime.Network;
-import java.io.IOException;
-import java.util.Collections;
-import org.apache.polygene.api.common.Visibility;
-import org.apache.polygene.bootstrap.ModuleAssembly;
-import org.apache.polygene.entitystore.mongodb.assembly.MongoDBEntityStoreAssembler;
-import org.apache.polygene.test.entity.model.EntityStoreTestSuite;
-import org.apache.polygene.test.util.FreePortFinder;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-public class EmbedMongoDBMapEntityStoreTestSuite extends EntityStoreTestSuite
-{
- private static final MongodStarter MONGO_STARTER = MongodStarter.getDefaultInstance();
-
- @Rule
- public TestName testName = new TestName();
- private static int port;
- private static MongodExecutable mongod;
-
- @BeforeClass
- public static void startEmbedMongo()
- throws IOException
- {
- port = FreePortFinder.findFreePortOnLoopback();
- mongod = MONGO_STARTER.prepare( new MongodConfigBuilder()
- .version( Version.Main.PRODUCTION )
- .net( new Net( "localhost", port, Network.localhostIsIPv6() ) )
- .build() );
- mongod.start();
- }
-
- @AfterClass
- public static void stopEmbedMongo()
- {
- if( mongod != null )
- {
- mongod.stop();
- }
- }
-
- @Override
- protected void defineStorageModule( ModuleAssembly module )
- {
- module.defaultServices();
- new MongoDBEntityStoreAssembler()
- .visibleIn( Visibility.application )
- .withConfig( configModule, Visibility.application )
- .assemble( module );
-
- MongoDBEntityStoreConfiguration mongoConfig = configModule.forMixin( MongoDBEntityStoreConfiguration.class )
- .declareDefaults();
- mongoConfig.writeConcern().set( MongoDBEntityStoreConfiguration.WriteConcern.MAJORITY );
- mongoConfig.database().set( "polygene-test" );
- mongoConfig.collection().set( testName.getMethodName() );
- mongoConfig.nodes().set( Collections.singletonList( "localhost:" + port ) );
- }
-}