jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meteata...@apache.org
Subject svn commit: r1418983 - in /jackrabbit/oak/trunk/oak-mongomk: pom.xml src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java
Date Sun, 09 Dec 2012 14:45:02 GMT
Author: meteatamel
Date: Sun Dec  9 14:45:01 2012
New Revision: 1418983

URL: http://svn.apache.org/viewvc?rev=1418983&view=rev
Log:
Added the test case for OAK-461

Modified:
    jackrabbit/oak/trunk/oak-mongomk/pom.xml
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/pom.xml?rev=1418983&r1=1418982&r2=1418983&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-mongomk/pom.xml Sun Dec  9 14:45:01 2012
@@ -161,7 +161,12 @@
       <artifactId>json-simple</artifactId>
       <version>1.1</version>
     </dependency>
-
+    <dependency>
+       <groupId>com.jamonapi</groupId>
+       <artifactId>jamon</artifactId>
+       <version>2.4</version>
+        <scope>test</scope>
+     </dependency>
   </dependencies>
 
 </project>

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java?rev=1418983&r1=1418982&r2=1418983&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKCommitAddTest.java
Sun Dec  9 14:45:01 2012
@@ -7,8 +7,12 @@ import static org.junit.Assert.fail;
 
 import org.apache.jackrabbit.mongomk.BaseMongoMicroKernelTest;
 import org.json.simple.JSONObject;
+import org.junit.Ignore;
 import org.junit.Test;
 
+import com.jamonapi.Monitor;
+import com.jamonapi.MonitorFactory;
+
 /**
  * Tests for {@link MongoMicroKernel#commit(String, String, String, String)}
  * with emphasis on add node and property operations.
@@ -154,4 +158,21 @@ public class MongoMKCommitAddTest extend
         JSONObject obj = parseJSONObject(nodes);
         assertPropertyValue(obj, "a/key1", "value3");
    }
+
+    // This is a test to make sure commit time stays the same as time goes on.
+    @Test
+    @Ignore("OAK-461")
+    public void commitTime() throws Exception {
+        boolean debug = false;
+        Monitor commitMonitor = MonitorFactory.getTimeMonitor("commit");
+        for (int i = 0; i < 1000; i++) {
+            commitMonitor.start();
+            String diff = "+\"a"+i+"\" : {} +\"b"+i+"\" : {} +\"c"+i+"\" : {}";
+            if (debug) System.out.println("Committing: " + diff);
+            mk.commit("/", diff, null, null);
+            commitMonitor.stop();
+            if (debug) System.out.println("Committed in " + commitMonitor.getLastValue()
+ "ms");
+        }
+        if (debug) System.out.println("Final Result:" + commitMonitor);
+    }
 }
\ No newline at end of file



Mime
View raw message