Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 79752 invoked from network); 8 Jun 2005 01:42:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jun 2005 01:42:01 -0000 Received: (qmail 97069 invoked by uid 500); 8 Jun 2005 01:42:00 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 97043 invoked by uid 500); 8 Jun 2005 01:42:00 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 97026 invoked by uid 99); 8 Jun 2005 01:41:59 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=SPF_HELO_FAIL X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: 32.97.110.129 is neither permitted nor denied by domain of suresh.thalamati@gmail.com) Received: from e31.co.us.ibm.com (HELO e31.co.us.ibm.com) (32.97.110.129) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 07 Jun 2005 18:41:57 -0700 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e31.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j581fsua416986 for ; Tue, 7 Jun 2005 21:41:54 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j581fs67205042 for ; Tue, 7 Jun 2005 19:41:54 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j581fsYF028169 for ; Tue, 7 Jun 2005 19:41:54 -0600 Received: from [127.0.0.1] ([9.30.40.113]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j581fqHK028107 for ; Tue, 7 Jun 2005 19:41:54 -0600 Message-ID: <42A64CDE.9050502@gmail.com> Date: Tue, 07 Jun 2005 18:41:50 -0700 From: Suresh Thalamati User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Derby Development Subject: Re: Problem with backup in storerecovery test suite References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N �ystein Gr�vlen wrote: >As part of Derby-298, I am trying to make a test that recovers a >database on which backup was performed just before it stopped. >Following the scheme of the other tests in the storerecovery test >suite, I first have a test that stops without shutting down the >database and then another test that picks up the database and does >recovery. (I must admit I have not quite understood how this works, >but it does work when running the tests in the testsuite. > As you mentioned to test recovery we need to exit from the test without shutting down the database and reboot the same database and then verify that the data is as expected after recovery. This is done storerecovery suite by using a suite leve property called 'usesystem' . When this property is set tests does not cleanup the database after successful completion. To test a particular recovery scenarion , one needs to add a test that generates the transacton log and another test that performs the recovery and verifies that the database is in the expected state: For example to test the max log number change, I added : store/ MaxLogNumber.java : creates the database and does some DML operations store/MaxLogNumberRecovery.java : connects to the database created in store/ MaxLogNumber.java and verifies the data is as expected. I think it is good idea to make these tests run on different database than the default 'wombat', otherwise it will get hard to debug if there are failures. database name can be specified using 'database' property like database=jdbc:derby:maxlogwombat;create=true in _app.properties file > I have not >been able to get this to work when manually running the tests). > > > if you run them as individual tests , database will get cleaned up after the setup test and there will nothing available to test by the recovery test. 'usesystem' property currently works at a suite level. >My current problem is that my first test fails when doing backup. The >backup command gets the following exception: > > > By looking at it briefly could not figure out why the following error is coming if you run it as suite. One thing I noticed though backup tests have following test properties : useextdirs=true usedefaults=true you need to create a file RecoveryAfterBackupSetup_app.properties and put them there. I really wonder why they are needed ? , may be test harness is modifying user.dir ..etc. >ERROR XSRS5: Error copying file (during backup) from /home/og136792/derby/clean/testdir/storerecovery/storerecovery/storerecovery/wombat to extinout/backup/wombat. > > > > > > Thanks -suresht