diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml
index d3db7956f0a..e2c5afa0fb5 100644
--- a/tests/test-sessions/pom.xml
+++ b/tests/test-sessions/pom.xml
@@ -32,5 +32,6 @@
test-sessions-common
test-hash-sessions
test-jdbc-sessions
+ test-mongodb-sessions
diff --git a/tests/test-sessions/test-mongodb-sessions/pom.xml b/tests/test-sessions/test-mongodb-sessions/pom.xml
new file mode 100644
index 00000000000..951ae89cda4
--- /dev/null
+++ b/tests/test-sessions/test-mongodb-sessions/pom.xml
@@ -0,0 +1,140 @@
+
+
+
+ 4.0.0
+
+ org.eclipse.jetty.tests
+ test-sessions-parent
+ 7.6.1-SNAPSHOT
+
+ test-mongo-sessions
+ Jetty Tests :: Sessions :: Mongo
+
+
+
+ maven-compiler-plugin
+
+
+ 1.5
+
+
+
+ org.apache.maven.plugins
+ maven-deploy-plugin
+
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ unpack
+ generate-test-resources
+
+ unpack
+
+
+
+
+ org.eclipse.jetty.toolchain
+ jetty-test-policy
+ ${jetty-test-policy-version}
+ jar
+ true
+ **/*.keystore,**/*.pem
+ ${jetty.test.policy.loc}
+
+
+
+
+
+
+
+
+
+
+ org.eclipse.jetty
+ jetty-server
+ ${project.version}
+
+
+ org.eclipse.jetty
+ jetty-webapp
+ ${project.version}
+
+
+ org.eclipse.jetty
+ jetty-client
+ ${project.version}
+
+
+ org.eclipse.jetty.tests
+ test-sessions-common
+ ${project.version}
+
+
+ org.eclipse.jetty
+ jetty-nosql
+ ${project.version}
+
+
+ org.eclipse.jetty
+ jetty-jmx
+ ${project.version}
+ true
+
+
+ junit
+ junit
+ test
+
+
+
+
+ mongodb
+
+
+ mongodb.enabled
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+ false
+
+
+
+
+
+
+
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java
similarity index 97%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java
index edc1337b0f2..1e50869703d 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java
@@ -26,7 +26,6 @@ public class ClientCrossContextSessionTest extends AbstractClientCrossContextSes
}
@Test
- @Ignore ("requires mongodb server")
public void testCrossContextDispatch() throws Exception
{
super.testCrossContextDispatch();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java
similarity index 96%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java
index 70c7763c121..29e49b055a7 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java
@@ -26,7 +26,6 @@ public class LastAccessTimeTest extends AbstractLastAccessTimeTest
}
@Test
- @Ignore ("requires mongodb server")
public void testLastAccessTime() throws Exception
{
super.testLastAccessTime();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java
similarity index 96%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java
index 9bf3f5b5566..bdb84429e36 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java
@@ -30,7 +30,6 @@ public class LightLoadTest extends AbstractLightLoadTest
}
@Test
- @Ignore ("requires mongodb server")
public void testLightLoad() throws Exception
{
super.testLightLoad();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTest.java
similarity index 100%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTest.java
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java
similarity index 100%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java
similarity index 97%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java
index 216770ca0f1..b8ee0d9e086 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java
@@ -30,7 +30,6 @@ public class NewSessionTest extends AbstractNewSessionTest
}
@Test
- @Ignore ("requires mongodb server")
public void testNewSession() throws Exception
{
super.testNewSession();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java
similarity index 97%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java
index b38524cb229..b6a073c28ca 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java
@@ -29,7 +29,6 @@ public class OrphanedSessionTest extends AbstractOrphanedSessionTest
}
@Test
- @Ignore ("requires mongodb server")
public void testOrphanedSession() throws Exception
{
super.testOrphanedSession();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java
similarity index 97%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java
index a342a734ee7..53db193fe6c 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java
@@ -29,7 +29,6 @@ public class ReentrantRequestSessionTest extends AbstractReentrantRequestSession
}
@Test
- @Ignore ("requires mongodb server")
public void testReentrantRequestSession() throws Exception
{
super.testReentrantRequestSession();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java
similarity index 96%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java
index bbbf85628a1..aa857192471 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java
@@ -26,7 +26,6 @@ public class RemoveSessionTest extends AbstractRemoveSessionTest
}
@Test
- @Ignore ("requires mongodb server")
public void testRemoveSession() throws Exception
{
super.testRemoveSession();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java
similarity index 97%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java
index d5c308363a9..0ec56dc1e5c 100644
--- a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java
@@ -26,7 +26,6 @@ public class ServerCrossContextSessionTest extends AbstractServerCrossContextSes
}
@Test
- @Ignore ("requires mongodb server")
public void testCrossContextDispatch() throws Exception
{
super.testCrossContextDispatch();
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionDump.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionDump.java
similarity index 100%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionDump.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionDump.java
diff --git a/jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionSavingValueTest.java b/tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionSavingValueTest.java
similarity index 100%
rename from jetty-nosql/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionSavingValueTest.java
rename to tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionSavingValueTest.java
diff --git a/tests/test-sessions/test-mongodb-sessions/src/test/resources/keystore b/tests/test-sessions/test-mongodb-sessions/src/test/resources/keystore
new file mode 100644
index 00000000000..b727bd0fb77
Binary files /dev/null and b/tests/test-sessions/test-mongodb-sessions/src/test/resources/keystore differ
diff --git a/tests/test-sessions/test-mongodb-sessions/src/test/resources/realm.properties b/tests/test-sessions/test-mongodb-sessions/src/test/resources/realm.properties
new file mode 100644
index 00000000000..6cd8ffa4012
--- /dev/null
+++ b/tests/test-sessions/test-mongodb-sessions/src/test/resources/realm.properties
@@ -0,0 +1,22 @@
+#
+# This file defines users passwords and roles for a HashUserRealm
+#
+# The format is
+# : [, ...]
+#
+# Passwords may be clear text, obfuscated or checksummed. The class
+# org.eclipse.util.Password should be used to generate obfuscated
+# passwords or password checksums
+#
+# If DIGEST Authentication is used, the password must be in a recoverable
+# format, either plain text or OBF:.
+#
+# if using digest authentication, do not MD5-hash the password
+jetty: jetty,user
+admin: CRYPT:ad1ks..kc.1Ug,server-administrator,content-administrator,admin,user
+other: OBF:1xmk1w261u9r1w1c1xmq,user
+plain: plain,user
+user: password,user
+
+# This entry is for digest auth. The credential is a MD5 hash of username:realmname:password
+digest: MD5:6e120743ad67abfbc385bc2bb754e297,user