From 4a180eef3b528d5f9230ed2254b65e28cac29ff5 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Fri, 10 Feb 2012 14:19:13 +1100 Subject: [PATCH] Move mongodb tests from jetty-nosql module to common test module. Activate during build with -Dmongodb.enabled=true --- tests/test-sessions/pom.xml | 1 + .../test-mongodb-sessions/pom.xml | 140 ++++++++++++++++++ .../ClientCrossContextSessionTest.java | 1 - .../nosql/mongodb/LastAccessTimeTest.java | 1 - .../jetty/nosql/mongodb/LightLoadTest.java | 1 - .../jetty/nosql/mongodb/MongoTest.java | 0 .../jetty/nosql/mongodb/MongoTestServer.java | 0 .../jetty/nosql/mongodb/NewSessionTest.java | 1 - .../nosql/mongodb/OrphanedSessionTest.java | 1 - .../mongodb/ReentrantRequestSessionTest.java | 1 - .../nosql/mongodb/RemoveSessionTest.java | 1 - .../ServerCrossContextSessionTest.java | 1 - .../jetty/nosql/mongodb/SessionDump.java | 0 .../nosql/mongodb/SessionSavingValueTest.java | 0 .../src/test/resources/keystore | Bin 0 -> 1426 bytes .../src/test/resources/realm.properties | 22 +++ 16 files changed, 163 insertions(+), 8 deletions(-) create mode 100644 tests/test-sessions/test-mongodb-sessions/pom.xml rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/ClientCrossContextSessionTest.java (97%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/LastAccessTimeTest.java (96%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/LightLoadTest.java (96%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTest.java (100%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/MongoTestServer.java (100%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/NewSessionTest.java (97%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/OrphanedSessionTest.java (97%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/ReentrantRequestSessionTest.java (97%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/RemoveSessionTest.java (96%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/ServerCrossContextSessionTest.java (97%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionDump.java (100%) rename {jetty-nosql => tests/test-sessions/test-mongodb-sessions}/src/test/java/org/eclipse/jetty/nosql/mongodb/SessionSavingValueTest.java (100%) create mode 100644 tests/test-sessions/test-mongodb-sessions/src/test/resources/keystore create mode 100644 tests/test-sessions/test-mongodb-sessions/src/test/resources/realm.properties 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 + 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 0000000000000000000000000000000000000000..b727bd0fb777fddb3463c81cb56963a7541f7b45 GIT binary patch literal 1426 zcmezO_TO6u1_mY|W&~r_+{*0KN+9!5EW=$#pv*3VCZ=r$d~96WY>X_7T1LX-9cnmv_92vyZY^nksPD zdgGz_%YMiA%<+G`?zc{_^OTmKsam}GdFt7neK!{P|Bco8Yq|9PvTGT0HqQC!@x9l1 z+kfrLjk$U4PfrzX4>?lEY_X)NU`c_upzVKwLzZV_Z=OB7;%H;~#q=-kB7C15mGAK^ zvQDWpwV1Q=%|)J*vS+h8eD_X&KBLa;y!Ym4fd?y?u6<@yiQRcgW4YSWJ1qI-Q@4qE za4m1Vxao>O&#^E1)!s>&+m1~AFk#ErRgE9c$R|1RHZn>ST)F2PCX`h;GftH|P3C*s zWzB^ZGW^U2Io6G9jl> z6zzz+mrM40Funf&SL@T49sAWnZvUNcc-}kaM`;+(`I*O}e=OTwz2vdB%C^t0KV2dN z8|5bLIJC=m`3p1S>EdUM&gly9o_)k?62R=&u_P~(KYzPEv+V7u$GBF7Yt*targsEg zTQzgVqnKmgxtO%H)!0fto_uWX^v1c;QdM?#toT{0*tgvCKBx=r`VraapZ2`+cgggB z-Pvqw9={ifyv(DLz=%jkh_cpEkNBn#fQtx!K-V#22ApgPb-K(wNrdO3Et=(zk zH%r#4Uj9|=lZlRA5;d`xvpUaban7~tb)L?vqO(?31t6P_KXXUmI|NTdEW^*XD%W$kc6J6C`ZJL_TRc(ux#yKj=Ue_0-Rb!XA^BcIEU@^esCUfRc7B*q_(7f!t{PH}Q2nU7; zJ3>UpKnkRbOIX-9zos$!bwcyY3l3?6uy+&YLB9AjrXwMJ9=TVxnh^gTTRrgQDAx z_HixoIbPSC|G?I^w5omSz6+C2WR&Q742Af!tZ{F_B0c(^#Lh& zza|JWF*7nSB0CQl;mkmH*$SFDWnY}}>VU(o3#<5V+huGG`Dn2??1_qdd2)==i--F? zs#KSqOx?Wrm7jRA(!0Yuu5HVhrWZZce5Lb}5Bq8!uvR=V-JM%7`INM|?JE9h{&PR9 zPS5OYv=7|qeAeX{<0}8%Th2N96wN*x(D1*r!0!3JEkDAd&tKmoUZ_-IpH*z9SS: [, ...] +# +# 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