db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suresh Thalamati <suresh.thalam...@gmail.com>
Subject Re: Problem with backup in storerecovery test suite
Date Wed, 08 Jun 2005 01:41:50 GMT
 
Ø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 <testname> 
_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.
>  
>
>	<snip...> 
>
>  
>


Thanks
-suresht



Mime
View raw message