Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7EC099B32 for ; Wed, 22 Feb 2012 21:03:41 +0000 (UTC) Received: (qmail 48401 invoked by uid 500); 22 Feb 2012 21:03:41 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 48378 invoked by uid 500); 22 Feb 2012 21:03:41 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 48369 invoked by uid 99); 22 Feb 2012 21:03:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 21:03:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Feb 2012 21:03:39 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 31B762388860; Wed, 22 Feb 2012 21:03:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: derby-commits@db.apache.org From: mikem@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120222210318.31B762388860@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 +}