db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r1292502 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java
Date Wed, 22 Feb 2012 21:03:18 GMT
Author: mikem
Date: Wed Feb 22 21:03:17 2012
New Revision: 1292502

URL: http://svn.apache.org/viewvc?rev=1292502&view=rev
Log:
updating comment.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java?rev=1292502&r1=1292501&r2=1292502&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryTest.java
Wed Feb 22 21:03:17 2012
@@ -69,7 +69,7 @@ public final class RecoveryTest extends 
      * fork a jvm, add one row, commit, add another row, exit the jvm(killed).
      * Reconnect with the first jvm and verify that the first row is there 
      * and the second is not. 
-     * When a new JVM connects, the log entries are read one by one and if 
+     * When a new JVM connects, the log entries are read one by one and it 
      * then rolls back to the transaction boundaries, then the database is
      * in a consistent state. 
      * @throws Exception
@@ -95,7 +95,18 @@ public final class RecoveryTest extends 
 
     /**
      * This fixture is used by the forked JVM to add and commit rows to the
-     * database in the first JVM.
+     * database in the first JVM.  Note that this routine does not shutdown
+     * the database, and thus executes a "dirty" shutdown.  This dirty 
+     * shutdown is why we are forking the JVM so that we can test recovery
+     * codepaths during the reboot of the database.
+     *
+     * Do not call TestConfiguration.getCurrent().shutdownDatabase(), as
+     * that will do a clean shutdown and leave no work for restart recovery
+     * to do.  The point of assertLaunchedJUnitTestMethod() is to launch
+     * a separate process, crash it after some work, and then do restart
+     * recovery to test those code paths that only get exercised when restart
+     * starts on a non-cleanly shutdown database.
+     *
      * @throws SQLException 
      **/
     public void launchRecoveryInsert() throws SQLException
@@ -107,4 +118,4 @@ public final class RecoveryTest extends 
             c.commit();
             st.executeUpdate("insert into t(i) values (2011)");
     }
-}
\ No newline at end of file
+}



Mime
View raw message